Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/paths/src/lib.rs')
-rw-r--r--crates/paths/src/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/paths/src/lib.rs b/crates/paths/src/lib.rs
index 083dfcf43d..0cfbf1d9a1 100644
--- a/crates/paths/src/lib.rs
+++ b/crates/paths/src/lib.rs
@@ -166,9 +166,8 @@ impl AbsPath {
AbsPathBuf::try_from(self.0.to_path_buf()).unwrap()
}
- /// Equivalent of [`Path::canonicalize`] for `AbsPath`.
- pub fn canonicalize(&self) -> Result<AbsPathBuf, std::io::Error> {
- Ok(self.as_ref().canonicalize()?.try_into().unwrap())
+ pub fn canonicalize(&self) -> ! {
+ panic!("We explicitly do not provide canonicalization API, as that is almost always a wrong solution, see #14430")
}
/// Equivalent of [`Path::strip_prefix`] for `AbsPath`.