Add AutoBorrowMutability; its like hir::Mutability but w/ two-phase borrow info too.
Namely, the mutable borrows also carries a flag indicating whether they should support two-phase borrows. This allows us to thread down, from the point of the borrow's introduction, whether the particular adjustment that created it is one that yields two-phase mutable borrows.
This commit is contained in:
parent
1855ab7424
commit
c8041dd8ac
11 changed files with 154 additions and 28 deletions
|
|
@ -760,7 +760,7 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
|
|||
expr.span,
|
||||
cmt_base,
|
||||
r,
|
||||
ty::BorrowKind::from_mutbl(m),
|
||||
ty::BorrowKind::from_mutbl(m.into()),
|
||||
AutoRef);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue