Add Span to StmtKind::Let.
This commit is contained in:
parent
28d74a9b72
commit
3b47cdc439
6 changed files with 71 additions and 2 deletions
|
@ -1984,6 +1984,13 @@ impl<'tcx> Rvalue<'tcx> {
|
|||
}
|
||||
|
||||
impl BorrowKind {
|
||||
pub fn mutability(&self) -> Mutability {
|
||||
match *self {
|
||||
BorrowKind::Shared | BorrowKind::Shallow | BorrowKind::Unique => Mutability::Not,
|
||||
BorrowKind::Mut { .. } => Mutability::Mut,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn allows_two_phase_borrow(&self) -> bool {
|
||||
match *self {
|
||||
BorrowKind::Shared | BorrowKind::Shallow | BorrowKind::Unique => false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue