Skip to content

Commit e7361ea

Browse files
committed
Use re_erased instead of re_static
1 parent 489ee09 commit e7361ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_mir/transform/promote_consts.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -969,11 +969,11 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
969969
let span = statement.source_info.span;
970970

971971
let ref_ty = tcx.mk_ref(
972-
tcx.lifetimes.re_static,
972+
tcx.lifetimes.re_erased,
973973
ty::TypeAndMut { ty, mutbl: borrow_kind.to_mutbl_lossy() },
974974
);
975975

976-
*region = tcx.lifetimes.re_static;
976+
*region = tcx.lifetimes.re_erased;
977977

978978
let mut projection = vec![PlaceElem::Deref];
979979
projection.extend(place.projection);
@@ -997,7 +997,7 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
997997
self.extra_statements.push((loc, promoted_ref_statement));
998998

999999
Rvalue::Ref(
1000-
tcx.lifetimes.re_static,
1000+
tcx.lifetimes.re_erased,
10011001
borrow_kind,
10021002
Place {
10031003
local: mem::replace(

0 commit comments

Comments
 (0)