merge BorrowKind::Unique
into BorrowKind::Mut
This commit is contained in:
parent
6fc0273b5a
commit
8fb4c41f35
21 changed files with 109 additions and 105 deletions
|
@ -522,7 +522,7 @@ impl<'tcx> Inliner<'tcx> {
|
|||
trace!("creating temp for return destination");
|
||||
let dest = Rvalue::Ref(
|
||||
self.tcx.lifetimes.re_erased,
|
||||
BorrowKind::Mut { allow_two_phase_borrow: false },
|
||||
BorrowKind::Mut { kind: MutBorrowKind::Default },
|
||||
destination,
|
||||
);
|
||||
let dest_ty = dest.ty(caller_body, self.tcx);
|
||||
|
|
|
@ -188,7 +188,7 @@ fn build_drop_shim<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, ty: Option<Ty<'tcx>>)
|
|||
// has been put into the body.
|
||||
let reborrow = Rvalue::Ref(
|
||||
tcx.lifetimes.re_erased,
|
||||
BorrowKind::Mut { allow_two_phase_borrow: false },
|
||||
BorrowKind::Mut { kind: MutBorrowKind::Default },
|
||||
tcx.mk_place_deref(dropee_ptr),
|
||||
);
|
||||
let ref_ty = reborrow.ty(body.local_decls(), tcx);
|
||||
|
@ -712,7 +712,7 @@ fn build_call_shim<'tcx>(
|
|||
)
|
||||
.immutable(),
|
||||
);
|
||||
let borrow_kind = BorrowKind::Mut { allow_two_phase_borrow: false };
|
||||
let borrow_kind = BorrowKind::Mut { kind: MutBorrowKind::Default };
|
||||
statements.push(Statement {
|
||||
source_info,
|
||||
kind: StatementKind::Assign(Box::new((
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue