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

@@ -456,7 +456,7 @@ impl<'tcx> Validator<'_, 'tcx> {
match kind {
// Reject these borrow types just to be safe.
// FIXME(RalfJung): could we allow them? Should we? No point in it until we have a usecase.
BorrowKind::Shallow | BorrowKind::Mut { kind: MutBorrowKind::ClosureCapture } => {
BorrowKind::Fake | BorrowKind::Mut { kind: MutBorrowKind::ClosureCapture } => {
return Err(Unpromotable);
}