Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/project-model/src/tests.rs')
-rw-r--r--crates/project-model/src/tests.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/project-model/src/tests.rs b/crates/project-model/src/tests.rs
index ddfea0ce4c..e304a59c01 100644
--- a/crates/project-model/src/tests.rs
+++ b/crates/project-model/src/tests.rs
@@ -75,8 +75,11 @@ fn get_test_path(file: &str) -> PathBuf {
fn get_fake_sysroot() -> Sysroot {
let sysroot_path = get_test_path("fake-sysroot");
- let sysroot_src_dir = AbsPathBuf::assert(sysroot_path);
- Sysroot::load(sysroot_src_dir).unwrap()
+ // there's no `libexec/` directory with a `proc-macro-srv` binary in that
+ // fake sysroot, so we give them both the same path:
+ let sysroot_dir = AbsPathBuf::assert(sysroot_path);
+ let sysroot_src_dir = sysroot_dir.clone();
+ Sysroot::load(sysroot_dir, sysroot_src_dir).unwrap()
}
fn rooted_project_json(data: ProjectJsonData) -> ProjectJson {