diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-05-07 15:58:09 +0200 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-05-29 23:02:40 +0200 |
| commit | 638acd300fa42a2d0128378a37bffae2c11315ad (patch) | |
| tree | af503410b4ee14f41216c9bbee3b299a7e4fdd91 /src/rustllvm/RustWrapper.cpp | |
| parent | 5c30dc85c23d23482148f5eb0485320bc1abc2a3 (diff) | |
| download | rust-638acd300fa42a2d0128378a37bffae2c11315ad.tar.gz rust-638acd300fa42a2d0128378a37bffae2c11315ad.zip | |
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 rust-lang/rust#49870
...
}
```
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
