mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Forbid canonicalization of paths and normalize all rust-project.json paths
This commit is contained in:
parent
60f4b3e26e
commit
939ebb4454
4 changed files with 17 additions and 25 deletions
|
@ -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`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue