Skip to content

Commit 9f10f58

Browse files
committed
Move new_remapping inside with_hir_id_owner
1 parent 1ece866 commit 9f10f58

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
13991399

14001400
// Contains the new lifetime definitions created for the TAIT (if any).
14011401
let mut collected_lifetimes = Vec::new();
1402-
let mut new_remapping = FxHashMap::default();
14031402

14041403
// If this came from a TAIT (as opposed to a function that returns an RPIT), we only want
14051404
// to capture the lifetimes that appear in the bounds. So visit the bounds to find out
@@ -1415,6 +1414,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
14151414
debug!(?lifetimes_to_remap);
14161415

14171416
self.with_hir_id_owner(opaque_ty_node_id, |lctx| {
1417+
let mut new_remapping = FxHashMap::default();
1418+
14181419
// If this opaque type is only capturing a subset of the lifetimes (those that appear
14191420
// in bounds), then create the new lifetime parameters required and create a mapping
14201421
// from the old `'a` (on the function) to the new `'a` (on the opaque type).

0 commit comments

Comments
 (0)