1
Fork 0

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

@ -668,7 +668,7 @@ impl<'tcx> Visitor<'tcx> for CanConstProp {
// These can't ever be propagated under any scheme, as we can't reason about indirect
// mutation.
| NonMutatingUse(NonMutatingUseContext::SharedBorrow)
| NonMutatingUse(NonMutatingUseContext::ShallowBorrow)
| NonMutatingUse(NonMutatingUseContext::FakeBorrow)
| NonMutatingUse(NonMutatingUseContext::AddressOf)
| MutatingUse(MutatingUseContext::Borrow)
| MutatingUse(MutatingUseContext::AddressOf) => {