Skip to content

Commit 9c7de6f

Browse files
committed
Move hir_bounds after lifetime_defs
1 parent 3f7db37 commit 9c7de6f

File tree

1 file changed

+4
-5
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+4
-5
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,10 +1427,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
14271427

14281428
// Install the remapping from old to new (if any):
14291429
lctx.with_remapping(new_remapping, |lctx| {
1430-
// Then when we lower the param bounds, references to 'a are remapped to 'a1, so we
1431-
// get back Debug + 'a1, which is suitable for use on the TAIT.
1432-
let hir_bounds = lctx.lower_param_bounds(bounds, itctx);
1433-
14341430
let lifetime_defs = lctx.arena.alloc_from_iter(collected_lifetimes.iter().map(
14351431
|&(new_node_id, lifetime)| {
14361432
let hir_id = lctx.lower_node_id(new_node_id);
@@ -1455,9 +1451,12 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
14551451
}
14561452
},
14571453
));
1458-
14591454
debug!("lower_opaque_impl_trait: lifetime_defs={:#?}", lifetime_defs);
14601455

1456+
// Then when we lower the param bounds, references to 'a are remapped to 'a1, so we
1457+
// get back Debug + 'a1, which is suitable for use on the TAIT.
1458+
let hir_bounds = lctx.lower_param_bounds(bounds, itctx);
1459+
14611460
let opaque_ty_item = hir::OpaqueTy {
14621461
generics: self.arena.alloc(hir::Generics {
14631462
params: lifetime_defs,

0 commit comments

Comments
 (0)