Handle cross-crate module ExpnId
s consistently
- Always use the ExpnId serialized to `tables` - Use the Id for traits and enums from other crates in resolution.
This commit is contained in:
parent
547a6ffee0
commit
4ecb49eba3
6 changed files with 13 additions and 12 deletions
|
@ -145,12 +145,7 @@ impl<'a> Resolver<'a> {
|
|||
} else {
|
||||
def_key.disambiguated_data.data.get_opt_name().expect("module without name")
|
||||
};
|
||||
let expn_id = if def_kind == DefKind::Mod {
|
||||
self.cstore().module_expansion_untracked(def_id, &self.session)
|
||||
} else {
|
||||
// FIXME: Parent expansions for enums and traits are not kept in metadata.
|
||||
ExpnId::root()
|
||||
};
|
||||
let expn_id = self.cstore().module_expansion_untracked(def_id, &self.session);
|
||||
|
||||
Some(self.new_module(
|
||||
parent,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue