1
Fork 0

Make def_key and HIR parenting consistent.

This commit is contained in:
Camille GILLOT 2021-02-13 20:41:02 +01:00
parent 17a07d71bf
commit 445b4e379c
11 changed files with 177 additions and 54 deletions

View file

@ -326,7 +326,7 @@ impl<'a> ResolverExpand for Resolver<'a> {
// nearest closing item - we should try to return the closest parent of the ExpnId
self.invocation_parents
.get(&expn_id)
.map_or(ast::CRATE_NODE_ID, |id| self.def_id_to_node_id[*id])
.map_or(ast::CRATE_NODE_ID, |id| self.def_id_to_node_id[id.0])
}
fn has_derive_copy(&self, expn_id: ExpnId) -> bool {