diff options
author | Aleksey Kladov <[email protected]> | 2021-06-18 20:47:02 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-06-18 20:47:02 +0100 |
commit | 89a0e58393de0ae39fc1f33a33cec87bc084a9f1 (patch) | |
tree | 2ab97438a45f9dc6cf72d42209923df19aa5d789 /crates/base_db/src | |
parent | 991919e71f048f9321e702512248e11c6c5fef70 (diff) |
internal: use minicore deref more
Diffstat (limited to 'crates/base_db/src')
-rw-r--r-- | crates/base_db/src/fixture.rs | 4 |
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)] | ||
202 | struct FileMeta { | 206 | struct FileMeta { |
203 | path: String, | 207 | path: String, |
204 | krate: Option<String>, | 208 | krate: Option<String>, |