]> git.lizzy.rs Git - rust.git/commitdiff
borrowck-describe-lvalue: --bless --compare-mode=nll.
authorMazdak Farrokhzad <twingoow@gmail.com>
Sun, 28 Jul 2019 05:04:16 +0000 (07:04 +0200)
committerMazdak Farrokhzad <twingoow@gmail.com>
Sun, 28 Jul 2019 05:04:16 +0000 (07:04 +0200)
src/test/ui/borrowck/borrowck-describe-lvalue.nll.stderr

index f1e1ae18839c4ed848c0a4fbdebe33faf8f76b87..20f05353d4633c8f39301f697220c99eadbafeba 100644 (file)
@@ -192,8 +192,8 @@ error[E0503]: cannot use `v[..]` because it was mutably borrowed
 LL |         let x = &mut v;
    |                 ------ borrow of `v` occurs here
 LL |         match v {
-LL |             &[x..] => println!("{:?}", x),
-   |               ^ use of borrowed `v`
+LL |             &[x @ ..] => println!("{:?}", x),
+   |               ^^^^^^ use of borrowed `v`
 ...
 LL |         drop(x);
    |              - borrow later used here
@@ -204,8 +204,8 @@ error[E0503]: cannot use `v[..]` because it was mutably borrowed
 LL |         let x = &mut v;
    |                 ------ borrow of `v` occurs here
 ...
-LL |             &[_, x..] => println!("{:?}", x),
-   |                  ^ use of borrowed `v`
+LL |             &[_, x @ ..] => println!("{:?}", x),
+   |                  ^^^^^^ use of borrowed `v`
 ...
 LL |         drop(x);
    |              - borrow later used here
@@ -216,8 +216,8 @@ error[E0503]: cannot use `v[..]` because it was mutably borrowed
 LL |         let x = &mut v;
    |                 ------ borrow of `v` occurs here
 ...
-LL |             &[x.., _] => println!("{:?}", x),
-   |               ^ use of borrowed `v`
+LL |             &[x @ .., _] => println!("{:?}", x),
+   |               ^^^^^^ use of borrowed `v`
 ...
 LL |         drop(x);
    |              - borrow later used here
@@ -228,8 +228,8 @@ error[E0503]: cannot use `v[..]` because it was mutably borrowed
 LL |         let x = &mut v;
    |                 ------ borrow of `v` occurs here
 ...
-LL |             &[_, x.., _] => println!("{:?}", x),
-   |                  ^ use of borrowed `v`
+LL |             &[_, x @ .., _] => println!("{:?}", x),
+   |                  ^^^^^^ use of borrowed `v`
 ...
 LL |         drop(x);
    |              - borrow later used here