Move new_remapping inside with_hir_id_owner
This commit is contained in:
parent
1ece866cf1
commit
9f10f589a7
1 changed files with 2 additions and 1 deletions
|
@ -1399,7 +1399,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
|
|
||||||
// Contains the new lifetime definitions created for the TAIT (if any).
|
// Contains the new lifetime definitions created for the TAIT (if any).
|
||||||
let mut collected_lifetimes = Vec::new();
|
let mut collected_lifetimes = Vec::new();
|
||||||
let mut new_remapping = FxHashMap::default();
|
|
||||||
|
|
||||||
// If this came from a TAIT (as opposed to a function that returns an RPIT), we only want
|
// If this came from a TAIT (as opposed to a function that returns an RPIT), we only want
|
||||||
// to capture the lifetimes that appear in the bounds. So visit the bounds to find out
|
// 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> {
|
||||||
debug!(?lifetimes_to_remap);
|
debug!(?lifetimes_to_remap);
|
||||||
|
|
||||||
self.with_hir_id_owner(opaque_ty_node_id, |lctx| {
|
self.with_hir_id_owner(opaque_ty_node_id, |lctx| {
|
||||||
|
let mut new_remapping = FxHashMap::default();
|
||||||
|
|
||||||
// If this opaque type is only capturing a subset of the lifetimes (those that appear
|
// If this opaque type is only capturing a subset of the lifetimes (those that appear
|
||||||
// in bounds), then create the new lifetime parameters required and create a mapping
|
// in bounds), then create the new lifetime parameters required and create a mapping
|
||||||
// from the old `'a` (on the function) to the new `'a` (on the opaque type).
|
// from the old `'a` (on the function) to the new `'a` (on the opaque type).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue