Use re_erased instead of re_static

This commit is contained in:
Santiago Pastorino 2019-12-19 14:09:04 -03:00 committed by Oliver Scherer
parent 7f3459a3b3
commit a5715a32b5

View file

@ -930,11 +930,11 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
let span = statement.source_info.span;
let ref_ty = tcx.mk_ref(
tcx.lifetimes.re_static,
tcx.lifetimes.re_erased,
ty::TypeAndMut { ty, mutbl: borrow_kind.to_mutbl_lossy() },
);
*region = tcx.lifetimes.re_static;
*region = tcx.lifetimes.re_erased;
let mut projection = vec![PlaceElem::Deref];
projection.extend(place.projection);
@ -958,7 +958,7 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
self.extra_statements.push((loc, promoted_ref_statement));
Rvalue::Ref(
tcx.lifetimes.re_static,
tcx.lifetimes.re_erased,
borrow_kind,
Place {
local: mem::replace(&mut place.local, promoted_ref),