Auto merge of #17337 - Veykril:assert-info, r=Veykril
Add path info to `AbsPathBuf::assert`'s assert cc https://github.com/rust-lang/rust-analyzer/issues/17335
This commit is contained in:
commit
1bed783846
1 changed files with 1 additions and 1 deletions
|
|
@ -197,7 +197,7 @@ impl AbsPath {
|
|||
///
|
||||
/// Panics if `path` is not absolute.
|
||||
pub fn assert(path: &Utf8Path) -> &AbsPath {
|
||||
assert!(path.is_absolute());
|
||||
assert!(path.is_absolute(), "{path} is not absolute");
|
||||
unsafe { &*(path as *const Utf8Path as *const AbsPath) }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue