aboutsummaryrefslogtreecommitdiff
path: root/crates/base_db/src/fixture.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/base_db/src/fixture.rs')
-rw-r--r--crates/base_db/src/fixture.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/base_db/src/fixture.rs b/crates/base_db/src/fixture.rs
index 3c6c516b2..66e6443cb 100644
--- a/crates/base_db/src/fixture.rs
+++ b/crates/base_db/src/fixture.rs
@@ -150,8 +150,6 @@ impl ChangeFixture {
150 entry.text.clone() 150 entry.text.clone()
151 }; 151 };
152 152
153 let explicit_root = entry.explicit_root;
154
155 let meta = FileMeta::from(entry); 153 let meta = FileMeta::from(entry);
156 assert!(meta.path.starts_with(&source_root_prefix)); 154 assert!(meta.path.starts_with(&source_root_prefix));
157 155
@@ -171,7 +169,7 @@ impl ChangeFixture {
171 let dep = CrateName::normalize_dashes(&dep); 169 let dep = CrateName::normalize_dashes(&dep);
172 crate_deps.push((crate_name.clone(), dep)) 170 crate_deps.push((crate_name.clone(), dep))
173 } 171 }
174 } else if meta.path == "/main.rs" || meta.path == "/lib.rs" || explicit_root { 172 } else if meta.path == "/main.rs" || meta.path == "/lib.rs" {
175 assert!(default_crate_root.is_none()); 173 assert!(default_crate_root.is_none());
176 default_crate_root = Some(file_id); 174 default_crate_root = Some(file_id);
177 default_cfg = meta.cfg; 175 default_cfg = meta.cfg;