about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2018-05-07 15:58:09 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2018-05-29 23:02:40 +0200
commit638acd300fa42a2d0128378a37bffae2c11315ad (patch)
treeaf503410b4ee14f41216c9bbee3b299a7e4fdd91 /src/test/incremental/thinlto
parent5c30dc85c23d23482148f5eb0485320bc1abc2a3 (diff)
downloadrust-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/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions