Use re_erased instead of re_static
This commit is contained in:
parent
7f3459a3b3
commit
a5715a32b5
1 changed files with 3 additions and 3 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue