aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_batch/src/lib.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs
index 3bbcdb0b8..5bb47afb2 100644
--- a/crates/ra_batch/src/lib.rs
+++ b/crates/ra_batch/src/lib.rs
@@ -126,10 +126,7 @@ mod tests {
126 126
127 #[test] 127 #[test]
128 fn test_loading_rust_analyzer() { 128 fn test_loading_rust_analyzer() {
129 let mut path = std::env::current_exe().unwrap(); 129 let path = Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap().parent().unwrap();
130 while !path.join("Cargo.toml").is_file() {
131 path = path.parent().unwrap().to_owned();
132 }
133 let (db, roots) = BatchDatabase::load_cargo(path).unwrap(); 130 let (db, roots) = BatchDatabase::load_cargo(path).unwrap();
134 let mut n_crates = 0; 131 let mut n_crates = 0;
135 for root in roots { 132 for root in roots {