Move hir_bounds after lifetime_defs
This commit is contained in:
parent
3f7db370ef
commit
9c7de6fb3c
1 changed files with 4 additions and 5 deletions
|
@ -1427,10 +1427,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
|
|
||||||
// Install the remapping from old to new (if any):
|
// Install the remapping from old to new (if any):
|
||||||
lctx.with_remapping(new_remapping, |lctx| {
|
lctx.with_remapping(new_remapping, |lctx| {
|
||||||
// Then when we lower the param bounds, references to 'a are remapped to 'a1, so we
|
|
||||||
// get back Debug + 'a1, which is suitable for use on the TAIT.
|
|
||||||
let hir_bounds = lctx.lower_param_bounds(bounds, itctx);
|
|
||||||
|
|
||||||
let lifetime_defs = lctx.arena.alloc_from_iter(collected_lifetimes.iter().map(
|
let lifetime_defs = lctx.arena.alloc_from_iter(collected_lifetimes.iter().map(
|
||||||
|&(new_node_id, lifetime)| {
|
|&(new_node_id, lifetime)| {
|
||||||
let hir_id = lctx.lower_node_id(new_node_id);
|
let hir_id = lctx.lower_node_id(new_node_id);
|
||||||
|
@ -1455,9 +1451,12 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
|
|
||||||
debug!("lower_opaque_impl_trait: lifetime_defs={:#?}", lifetime_defs);
|
debug!("lower_opaque_impl_trait: lifetime_defs={:#?}", lifetime_defs);
|
||||||
|
|
||||||
|
// Then when we lower the param bounds, references to 'a are remapped to 'a1, so we
|
||||||
|
// get back Debug + 'a1, which is suitable for use on the TAIT.
|
||||||
|
let hir_bounds = lctx.lower_param_bounds(bounds, itctx);
|
||||||
|
|
||||||
let opaque_ty_item = hir::OpaqueTy {
|
let opaque_ty_item = hir::OpaqueTy {
|
||||||
generics: self.arena.alloc(hir::Generics {
|
generics: self.arena.alloc(hir::Generics {
|
||||||
params: lifetime_defs,
|
params: lifetime_defs,
|
||||||
|
|
Loading…
Add table
Reference in a new issue