aboutsummaryrefslogtreecommitdiff
path: root/crates/base_db
diff options
context:
space:
mode:
Diffstat (limited to 'crates/base_db')
-rw-r--r--crates/base_db/src/fixture.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/base_db/src/fixture.rs b/crates/base_db/src/fixture.rs
index d56b20b83..d0c946d83 100644
--- a/crates/base_db/src/fixture.rs
+++ b/crates/base_db/src/fixture.rs
@@ -114,6 +114,9 @@ impl ChangeFixture {
114 114
115 let meta = FileMeta::from(entry); 115 let meta = FileMeta::from(entry);
116 assert!(meta.path.starts_with(&source_root_prefix)); 116 assert!(meta.path.starts_with(&source_root_prefix));
117 if !meta.deps.is_empty() {
118 assert!(meta.krate.is_some(), "can't specify deps without naming the crate")
119 }
117 120
118 if meta.introduce_new_source_root { 121 if meta.introduce_new_source_root {
119 roots.push(SourceRoot::new_local(mem::take(&mut file_set))); 122 roots.push(SourceRoot::new_local(mem::take(&mut file_set)));
@@ -199,6 +202,7 @@ impl ChangeFixture {
199 } 202 }
200} 203}
201 204
205#[derive(Debug)]
202struct FileMeta { 206struct FileMeta {
203 path: String, 207 path: String,
204 krate: Option<String>, 208 krate: Option<String>,