mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
Fix test compilation
This commit is contained in:
parent
1bb59a7d08
commit
7cbedc50bc
2 changed files with 2 additions and 2 deletions
|
@ -164,7 +164,7 @@ impl ModuleOrigin {
|
||||||
ModuleOrigin::Root(None) => unreachable!(),
|
ModuleOrigin::Root(None) => unreachable!(),
|
||||||
ModuleOrigin::Inline(m) => InFile::new(m.file_id, Either::Right(m.to_node(db))),
|
ModuleOrigin::Inline(m) => InFile::new(m.file_id, Either::Right(m.to_node(db))),
|
||||||
// FIXME: right now it's never constructed, so it's fine to omit
|
// FIXME: right now it's never constructed, so it's fine to omit
|
||||||
ModuleOrigin::Block(b) => unimplemented!(),
|
ModuleOrigin::Block(_b) => unimplemented!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ impl TestDB {
|
||||||
for &krate in self.relevant_crates(file_id).iter() {
|
for &krate in self.relevant_crates(file_id).iter() {
|
||||||
let crate_def_map = self.crate_def_map(krate);
|
let crate_def_map = self.crate_def_map(krate);
|
||||||
for (local_id, data) in crate_def_map.modules.iter() {
|
for (local_id, data) in crate_def_map.modules.iter() {
|
||||||
if data.definition == Some(file_id) {
|
if data.origin.file_id() == Some(file_id) {
|
||||||
return ModuleId { krate, local_id };
|
return ModuleId { krate, local_id };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue