diff --git a/test/rust_analyzer/generated_srcs_test/rust_project_json_test.rs b/test/rust_analyzer/generated_srcs_test/rust_project_json_test.rs index 81fe369554..71ab6ba1ea 100644 --- a/test/rust_analyzer/generated_srcs_test/rust_project_json_test.rs +++ b/test/rust_analyzer/generated_srcs_test/rust_project_json_test.rs @@ -48,7 +48,9 @@ mod tests { .find(|c| &c.display_name == "generated_srcs") .unwrap(); assert!(gen.root_module.starts_with("/")); - assert!(gen.root_module.ends_with("/lib.rs")); + assert!(gen + .root_module + .ends_with("rules_rust_test_rust_analyzer/lib.rs")); let include_dirs = &gen.source.as_ref().unwrap().include_dirs; assert!(include_dirs.len() == 1); diff --git a/tools/rust_analyzer/aquery.rs b/tools/rust_analyzer/aquery.rs index 2c634b04b1..acfea6cb14 100644 --- a/tools/rust_analyzer/aquery.rs +++ b/tools/rust_analyzer/aquery.rs @@ -208,6 +208,15 @@ fn consolidate_crate_specs(crate_specs: Vec) -> anyhow::Result