diff options
| author | bors <bors@rust-lang.org> | 2024-03-20 13:41:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-20 13:41:39 +0000 |
| commit | 5e276ae51c35eaa22411ba81a4c00457f32e6ab5 (patch) | |
| tree | a07b55ccd83d9442b4bb75fcba63322913df6599 | |
| parent | 6fce1d71dfb123e7a3e213a4f771f66d8bc66b3d (diff) | |
| parent | c7f02012b1e123665393ff0bc958c952fae46c89 (diff) | |
| download | rust-5e276ae51c35eaa22411ba81a4c00457f32e6ab5.tar.gz rust-5e276ae51c35eaa22411ba81a4c00457f32e6ab5.zip | |
Auto merge of #16899 - Veykril:discover-fix, r=Veykril
fix: Fix project discovery not checking whether the `Cargo.toml` actually exists Got dropped in https://github.com/rust-lang/rust-analyzer/pull/16889, somehow r-a's codebase itself doesn't even run into this so I didn't see it when testing ...
| -rw-r--r-- | crates/project-model/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/project-model/src/lib.rs b/crates/project-model/src/lib.rs index 51bb4fe303a..28696aa3277 100644 --- a/crates/project-model/src/lib.rs +++ b/crates/project-model/src/lib.rs @@ -126,6 +126,7 @@ impl ProjectManifest { entities .filter_map(Result::ok) .map(|it| it.path().join("Cargo.toml")) + .filter(|it| it.exists()) .map(AbsPathBuf::try_from) .filter_map(|it| it.ok()?.try_into().ok()) .collect() |
