]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/borrowck/borrowck-slice-pattern-element-loan-slice.stderr
Rollup merge of #102245 - ink-feather-org:const_cmp_by, r=fee1-dead
[rust.git] / src / test / ui / borrowck / borrowck-slice-pattern-element-loan-slice.stderr
index d3388e071aa5349820cf42dc7e010d031f96f152..f9a63bd49dd57d0f18349da122a6e8d79147aba4 100644 (file)
@@ -88,7 +88,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im
 LL |     if let [ref first, ref second, ..] = *s {
    |                        ---------- immutable borrow occurs here
 LL |         if let [_, ref mut tail @ ..] = *s {
-   |                    ^^^^^^^^^^^^^^^^^ mutable borrow occurs here
+   |                    ^^^^^^^^^^^^ mutable borrow occurs here
 LL |             nop(&[first, second]);
    |                          ------ immutable borrow later used here
 
@@ -98,7 +98,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im
 LL |     if let [.., ref second, ref first] = *s {
    |                 ---------- immutable borrow occurs here
 LL |         if let [ref mut tail @ .., _] = *s {
-   |                 ^^^^^^^^^^^^^^^^^ mutable borrow occurs here
+   |                 ^^^^^^^^^^^^ mutable borrow occurs here
 LL |             nop(&[first, second]);
    |                          ------ immutable borrow later used here
 
@@ -106,9 +106,9 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im
   --> $DIR/borrowck-slice-pattern-element-loan-slice.rs:65:17
    |
 LL |     if let [_, _, _, ref s1 @ ..] = *s {
-   |                      ----------- immutable borrow occurs here
+   |                      ------ immutable borrow occurs here
 LL |         if let [ref mut s2 @ .., _, _, _] = *s {
-   |                 ^^^^^^^^^^^^^^^ mutable borrow occurs here
+   |                 ^^^^^^^^^^ mutable borrow occurs here
 LL |             nop_subslice(s1);
    |                          -- immutable borrow later used here