replace unnecessary folder impls with fold_region
This commit is contained in:
parent
00bfd6b273
commit
41cfb20abb
4 changed files with 15 additions and 51 deletions
|
@ -864,6 +864,7 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
|
|||
};
|
||||
|
||||
// Use the underlying local for this (necessarily interior) borrow.
|
||||
debug_assert!(region.is_erased());
|
||||
let ty = local_decls[place.local].ty;
|
||||
let span = statement.source_info.span;
|
||||
|
||||
|
@ -873,8 +874,6 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
|
|||
ty::TypeAndMut { ty, mutbl: borrow_kind.to_mutbl_lossy() },
|
||||
);
|
||||
|
||||
*region = tcx.lifetimes.re_erased;
|
||||
|
||||
let mut projection = vec![PlaceElem::Deref];
|
||||
projection.extend(place.projection);
|
||||
place.projection = tcx.mk_place_elems(&projection);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue