rename BorrowKind::Shallow to Fake

also adds some comments
This commit is contained in:
lcnr
2023-11-08 13:42:30 +01:00
parent a42eca42df
commit 992d93f687
30 changed files with 75 additions and 68 deletions

View File

@@ -446,7 +446,7 @@ impl<'tcx> Rvalue<'tcx> {
impl BorrowKind {
pub fn mutability(&self) -> Mutability {
match *self {
BorrowKind::Shared | BorrowKind::Shallow => Mutability::Not,
BorrowKind::Shared | BorrowKind::Fake => Mutability::Not,
BorrowKind::Mut { .. } => Mutability::Mut,
}
}
@@ -454,7 +454,7 @@ impl BorrowKind {
pub fn allows_two_phase_borrow(&self) -> bool {
match *self {
BorrowKind::Shared
| BorrowKind::Shallow
| BorrowKind::Fake
| BorrowKind::Mut { kind: MutBorrowKind::Default | MutBorrowKind::ClosureCapture } => {
false
}