Skip to content

Commit 457ff7c

Browse files
committed
Iterate def_ids map backwards to try first the latest mappings (it's a stack)
1 parent e6478a3 commit 457ff7c

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+1
-1
lines changed

Diff for: compiler/rustc_ast_lowering/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl ResolverAstLoweringExt for ResolverAstLowering {
220220
}
221221

222222
fn get_remapped_def_id(&self, mut local_def_id: LocalDefId) -> LocalDefId {
223-
for map in &self.generics_def_id_map {
223+
for map in self.generics_def_id_map.iter().rev() {
224224
if let Some(r) = map.get(&local_def_id) {
225225
debug!("def_id_remapper: remapping from `{local_def_id:?}` to `{r:?}`");
226226
local_def_id = *r;

0 commit comments

Comments
 (0)