Fix test compilation
This commit is contained in:
parent
1bb59a7d08
commit
7cbedc50bc
@ -164,7 +164,7 @@ impl ModuleOrigin {
|
||||
ModuleOrigin::Root(None) => unreachable!(),
|
||||
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
|
||||
ModuleOrigin::Block(b) => unimplemented!(),
|
||||
ModuleOrigin::Block(_b) => unimplemented!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ impl TestDB {
|
||||
for &krate in self.relevant_crates(file_id).iter() {
|
||||
let crate_def_map = self.crate_def_map(krate);
|
||||
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 };
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user