mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Add path info to AbsPathBuf::assert
's assert
This commit is contained in:
parent
6b9baed80e
commit
cdb4f9631c
1 changed files with 1 additions and 1 deletions
|
@ -197,7 +197,7 @@ impl AbsPath {
|
||||||
///
|
///
|
||||||
/// Panics if `path` is not absolute.
|
/// Panics if `path` is not absolute.
|
||||||
pub fn assert(path: &Utf8Path) -> &AbsPath {
|
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) }
|
unsafe { &*(path as *const Utf8Path as *const AbsPath) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue