Add Span to StmtKind::Let.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user