Unnamed repository; edit this file 'description' to name the repository.
Add path info to `AbsPathBuf::assert`'s assert
Lukas Wirth 2024-06-03
parent 6b9baed · commit cdb4f96
-rw-r--r--crates/paths/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/paths/src/lib.rs b/crates/paths/src/lib.rs
index 2d3653401d..b1cefe9ade 100644
--- a/crates/paths/src/lib.rs
+++ b/crates/paths/src/lib.rs
@@ -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) }
}