Skip to content

Commit babe5a0

Browse files
spastorinoMark-Simulacrum
authored andcommitted
Iterate def_ids map backwards to try first the latest mappings (it's a stack)
1 parent 7a51fa4 commit babe5a0

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 1 addition & 1 deletion
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)