]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/borrowck/borrowck-anon-fields-variant.stderr
Sync portable-simd to rust-lang/portable-simd@72df4c45056a8bc0d1b3f06fdc828722177f0763
[rust.git] / src / test / ui / borrowck / borrowck-anon-fields-variant.stderr
index 2caeed1bd44ea634edd497d34858378ca97fb988..98f6f00a7d48bbdb6a725d0af80d535854020fea 100644 (file)
@@ -1,29 +1,29 @@
 error[E0503]: cannot use `y` because it was mutably borrowed
-  --> $DIR/borrowck-anon-fields-variant.rs:17:7
+  --> $DIR/borrowck-anon-fields-variant.rs:16:19
    |
 LL |       Foo::Y(ref mut a, _) => a,
    |              --------- borrow of `y.0` occurs here
 ...
-LL |       Foo::Y(_, ref mut b) => b,
-   |       ^^^^^^^^^^^^^^^^^^^^ use of borrowed `y.0`
+LL |     let b = match y {
+   |                   ^ use of borrowed `y.0`
 ...
 LL |     *a += 1;
    |     ------- borrow later used here
 
 error[E0503]: cannot use `y` because it was mutably borrowed
-  --> $DIR/borrowck-anon-fields-variant.rs:35:7
+  --> $DIR/borrowck-anon-fields-variant.rs:34:19
    |
 LL |       Foo::Y(ref mut a, _) => a,
    |              --------- borrow of `y.0` occurs here
 ...
-LL |       Foo::Y(ref mut b, _) => b,
-   |       ^^^^^^^^^^^^^^^^^^^^ use of borrowed `y.0`
+LL |     let b = match y {
+   |                   ^ use of borrowed `y.0`
 ...
 LL |     *a += 1;
    |     ------- borrow later used here
 
 error[E0499]: cannot borrow `y.0` as mutable more than once at a time
-  --> $DIR/borrowck-anon-fields-variant.rs:35:14
+  --> $DIR/borrowck-anon-fields-variant.rs:36:14
    |
 LL |       Foo::Y(ref mut a, _) => a,
    |              --------- first mutable borrow occurs here