Auto merge of #12808 - Veykril:check-workspace, r=Veykril

feat: Only flycheck workspace that belongs to saved file

Supercedes https://github.com/rust-lang/rust-analyzer/pull/11038

There is still the problem that all the diagnostics are cleared, only clearing diagnostics of the relevant workspace isn't easily doable though I think, will have to dig into that
This commit is contained in:
bors 2022-08-04 12:57:04 +00:00
commit 0fe3bcfd35
7 changed files with 123 additions and 23 deletions

View file

@ -106,6 +106,14 @@ impl AsRef<Path> for AbsPath {
}
}
impl ToOwned for AbsPath {
type Owned = AbsPathBuf;
fn to_owned(&self) -> Self::Owned {
AbsPathBuf(self.0.to_owned())
}
}
impl<'a> TryFrom<&'a Path> for &'a AbsPath {
type Error = &'a Path;
fn try_from(path: &'a Path) -> Result<&'a AbsPath, &'a Path> {