Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fallout from allowing some mutation in guards.
For some reason, allowing restricted mutation in match arms exposed an obvious case where a unique borrow can indeed fail, namely something like: ```rust match b { ... ref mut r if { (|| { let bar = &mut *r; **bar = false; })(); false } => { &mut *r } // ~~~~~~~ // | // This ends up holding a `&unique` borrow of `r`, but there ends up being an // implicit shared borrow in the guard thanks to #49870 ... } ```
- Loading branch information