diff options
Diffstat (limited to 'tests/ui/borrowck/borrowck-anon-fields-tuple.stderr')
-rw-r--r-- | tests/ui/borrowck/borrowck-anon-fields-tuple.stderr | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/borrowck/borrowck-anon-fields-tuple.stderr b/tests/ui/borrowck/borrowck-anon-fields-tuple.stderr new file mode 100644 index 000000000..88a8867f5 --- /dev/null +++ b/tests/ui/borrowck/borrowck-anon-fields-tuple.stderr @@ -0,0 +1,15 @@ +error[E0499]: cannot borrow `y.0` as mutable more than once at a time + --> $DIR/borrowck-anon-fields-tuple.rs:27:10 + | +LL | (ref mut a, _) => a + | --------- first mutable borrow occurs here +... +LL | (ref mut b, _) => b + | ^^^^^^^^^ second mutable borrow occurs here +... +LL | *a += 1; + | ------- first borrow later used here + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0499`. |