|
| 1 | +error: cannot borrow value as mutable more than once at a time |
| 2 | + --> $DIR/conflicting_bindings.rs:5:9 |
| 3 | + | |
| 4 | +LL | let ref mut y @ ref mut z = x; |
| 5 | + | ^^^^^^^^^ --------- value is mutably borrowed by `z` here |
| 6 | + | | |
| 7 | + | value is mutably borrowed by `y` here |
| 8 | + |
| 9 | +error: cannot borrow value as mutable more than once at a time |
| 10 | + --> $DIR/conflicting_bindings.rs:7:14 |
| 11 | + | |
| 12 | +LL | let Some(ref mut y @ ref mut z) = x else { return }; |
| 13 | + | ^^^^^^^^^ --------- value is mutably borrowed by `z` here |
| 14 | + | | |
| 15 | + | value is mutably borrowed by `y` here |
| 16 | + |
| 17 | +error: cannot borrow value as mutable more than once at a time |
| 18 | + --> $DIR/conflicting_bindings.rs:9:17 |
| 19 | + | |
| 20 | +LL | if let Some(ref mut y @ ref mut z) = x {} |
| 21 | + | ^^^^^^^^^ --------- value is mutably borrowed by `z` here |
| 22 | + | | |
| 23 | + | value is mutably borrowed by `y` here |
| 24 | + |
| 25 | +error: cannot borrow value as mutable more than once at a time |
| 26 | + --> $DIR/conflicting_bindings.rs:11:17 |
| 27 | + | |
| 28 | +LL | if let Some(ref mut y @ ref mut z) = x && true {} |
| 29 | + | ^^^^^^^^^ --------- value is mutably borrowed by `z` here |
| 30 | + | | |
| 31 | + | value is mutably borrowed by `y` here |
| 32 | + |
| 33 | +error: cannot borrow value as mutable more than once at a time |
| 34 | + --> $DIR/conflicting_bindings.rs:13:20 |
| 35 | + | |
| 36 | +LL | while let Some(ref mut y @ ref mut z) = x {} |
| 37 | + | ^^^^^^^^^ --------- value is mutably borrowed by `z` here |
| 38 | + | | |
| 39 | + | value is mutably borrowed by `y` here |
| 40 | + |
| 41 | +error: cannot borrow value as mutable more than once at a time |
| 42 | + --> $DIR/conflicting_bindings.rs:15:20 |
| 43 | + | |
| 44 | +LL | while let Some(ref mut y @ ref mut z) = x && true {} |
| 45 | + | ^^^^^^^^^ --------- value is mutably borrowed by `z` here |
| 46 | + | | |
| 47 | + | value is mutably borrowed by `y` here |
| 48 | + |
| 49 | +error: cannot borrow value as mutable more than once at a time |
| 50 | + --> $DIR/conflicting_bindings.rs:18:9 |
| 51 | + | |
| 52 | +LL | ref mut y @ ref mut z => {} |
| 53 | + | ^^^^^^^^^ --------- value is mutably borrowed by `z` here |
| 54 | + | | |
| 55 | + | value is mutably borrowed by `y` here |
| 56 | + |
| 57 | +error: cannot borrow value as mutable more than once at a time |
| 58 | + --> $DIR/conflicting_bindings.rs:21:24 |
| 59 | + | |
| 60 | +LL | () if let Some(ref mut y @ ref mut z) = x => {} |
| 61 | + | ^^^^^^^^^ --------- value is mutably borrowed by `z` here |
| 62 | + | | |
| 63 | + | value is mutably borrowed by `y` here |
| 64 | + |
| 65 | +error: aborting due to 8 previous errors |
| 66 | + |
0 commit comments