Skip to content

Commit a5715a3

Browse files
spastorinooli-obk
authored andcommitted
Use re_erased instead of re_static
1 parent 7f3459a commit a5715a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_mir/transform/promote_consts.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -930,11 +930,11 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
930930
let span = statement.source_info.span;
931931

932932
let ref_ty = tcx.mk_ref(
933-
tcx.lifetimes.re_static,
933+
tcx.lifetimes.re_erased,
934934
ty::TypeAndMut { ty, mutbl: borrow_kind.to_mutbl_lossy() },
935935
);
936936

937-
*region = tcx.lifetimes.re_static;
937+
*region = tcx.lifetimes.re_erased;
938938

939939
let mut projection = vec![PlaceElem::Deref];
940940
projection.extend(place.projection);
@@ -958,7 +958,7 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
958958
self.extra_statements.push((loc, promoted_ref_statement));
959959

960960
Rvalue::Ref(
961-
tcx.lifetimes.re_static,
961+
tcx.lifetimes.re_erased,
962962
borrow_kind,
963963
Place {
964964
local: mem::replace(&mut place.local, promoted_ref),

0 commit comments

Comments
 (0)