diff --git a/src/tools/rust-analyzer/crates/project-model/src/workspace.rs b/src/tools/rust-analyzer/crates/project-model/src/workspace.rs index 79bbbfb235e5..e02891eca205 100644 --- a/src/tools/rust-analyzer/crates/project-model/src/workspace.rs +++ b/src/tools/rust-analyzer/crates/project-model/src/workspace.rs @@ -844,6 +844,8 @@ impl ProjectWorkspace { exclude.push(pkg_root.join("examples")); exclude.push(pkg_root.join("benches")); } + include.sort(); + include.dedup(); PackageRoot { is_local, include, exclude } }) .chain(mk_sysroot()) @@ -905,6 +907,8 @@ impl ProjectWorkspace { exclude.push(pkg_root.join("examples")); exclude.push(pkg_root.join("benches")); } + include.sort(); + include.dedup(); PackageRoot { is_local, include, exclude } }) }))