diff options
Diffstat (limited to 'src/test/ui/pattern/bindings-after-at')
11 files changed, 104 insertions, 159 deletions
diff --git a/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr b/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr index 4249a74b3..fad84dda0 100644 --- a/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr +++ b/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr @@ -40,9 +40,8 @@ error[E0382]: borrow of moved value --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:12:14 | LL | Some(ref _y @ _z) => {} - | ^^^^^^^^^-- - | | | - | | value moved here + | ^^^^^^ -- value moved here + | | | value borrowed here after move | = note: move occurs because value has type `X`, which does not implement the `Copy` trait @@ -55,9 +54,8 @@ error[E0382]: borrow of moved value --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:26:14 | LL | Some(ref mut _y @ _z) => {} - | ^^^^^^^^^^^^^-- - | | | - | | value moved here + | ^^^^^^^^^^ -- value moved here + | | | value borrowed here after move | = note: move occurs because value has type `X`, which does not implement the `Copy` trait diff --git a/src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr b/src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr index ee0885a01..a481ca468 100644 --- a/src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr +++ b/src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr @@ -2,9 +2,8 @@ error[E0382]: use of partially moved value --> $DIR/bind-by-move-no-subbindings-fun-param.rs:7:6 | LL | fn f(a @ A(u): A) -> Box<u8> { - | ^^^^^^-^ - | | | - | | value partially moved here + | ^ - value partially moved here + | | | value used here after partial move | = note: partial move occurs because value has type `Box<u8>`, which does not implement the `Copy` trait diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr index 8e00bf5c3..a227cc583 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value --> $DIR/borrowck-move-and-move.rs:11:9 | LL | let a @ b = U; - | ^^^^- - move occurs because value has type `U`, which does not implement the `Copy` trait + | ^ - - move occurs because value has type `U`, which does not implement the `Copy` trait | | | | | value moved here | value used here after move @@ -11,9 +11,8 @@ error[E0382]: use of partially moved value --> $DIR/borrowck-move-and-move.rs:13:9 | LL | let a @ (b, c) = (U, U); - | ^^^^^^^^-^ - | | | - | | value partially moved here + | ^ - value partially moved here + | | | value used here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait @@ -22,9 +21,8 @@ error[E0382]: use of partially moved value --> $DIR/borrowck-move-and-move.rs:15:9 | LL | let a @ (b, c) = (u(), u()); - | ^^^^^^^^-^ - | | | - | | value partially moved here + | ^ - value partially moved here + | | | value used here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait @@ -35,9 +33,8 @@ error[E0382]: use of moved value LL | match Ok(U) { | ----- move occurs because value has type `Result<U, U>`, which does not implement the `Copy` trait LL | a @ Ok(b) | a @ Err(b) => {} - | -------^- - | | | - | | value used here after move + | - ^ value used here after move + | | | value moved here error[E0382]: use of moved value @@ -46,18 +43,16 @@ error[E0382]: use of moved value LL | match Ok(U) { | ----- move occurs because value has type `Result<U, U>`, which does not implement the `Copy` trait LL | a @ Ok(b) | a @ Err(b) => {} - | --------^- - | | | - | | value used here after move + | - ^ value used here after move + | | | value moved here error[E0382]: use of partially moved value --> $DIR/borrowck-move-and-move.rs:25:9 | LL | xs @ [a, .., b] => {} - | ^^^^^^^^^^^^^-^ - | | | - | | value partially moved here + | ^^ - value partially moved here + | | | value used here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait @@ -66,9 +61,8 @@ error[E0382]: use of partially moved value --> $DIR/borrowck-move-and-move.rs:29:9 | LL | xs @ [_, ys @ .., _] => {} - | ^^^^^^^^^-------^^^^ - | | | - | | value partially moved here + | ^^ -- value partially moved here + | | | value used here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait @@ -77,9 +71,8 @@ error[E0382]: use of moved value --> $DIR/borrowck-move-and-move.rs:22:12 | LL | fn fun(a @ b: U) {} - | ^^^^- - | | | - | | value moved here + | ^ - value moved here + | | | value used here after move | move occurs because value has type `U`, which does not implement the `Copy` trait diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr index 4b2048855..002c7609f 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr @@ -74,9 +74,8 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-at-and-box.rs:31:9 | LL | let ref a @ box b = Box::new(NC); - | ^^^^^^^^^^^^- - | | | - | | value moved here + | ^^^^^ - value moved here + | | | value borrowed here after move | = note: move occurs because value has type `NC`, which does not implement the `Copy` trait @@ -85,9 +84,8 @@ error[E0502]: cannot borrow value as immutable because it is also borrowed as mu --> $DIR/borrowck-pat-at-and-box.rs:38:9 | LL | let ref a @ box ref mut b = Box::new(NC); - | ^^^^^^^^^^^^--------- - | | | - | | mutable borrow occurs here + | ^^^^^ --------- mutable borrow occurs here + | | | immutable borrow occurs here ... LL | *b = NC; @@ -97,9 +95,8 @@ error[E0502]: cannot borrow value as immutable because it is also borrowed as mu --> $DIR/borrowck-pat-at-and-box.rs:42:9 | LL | let ref a @ box ref mut b = Box::new(NC); - | ^^^^^^^^^^^^--------- - | | | - | | mutable borrow occurs here + | ^^^^^ --------- mutable borrow occurs here + | | | immutable borrow occurs here ... LL | *b = NC; @@ -109,9 +106,8 @@ error[E0502]: cannot borrow value as mutable because it is also borrowed as immu --> $DIR/borrowck-pat-at-and-box.rs:48:9 | LL | let ref mut a @ box ref b = Box::new(NC); - | ^^^^^^^^^^^^^^^^----- - | | | - | | immutable borrow occurs here + | ^^^^^^^^^ ----- immutable borrow occurs here + | | | mutable borrow occurs here ... LL | drop(b); @@ -121,9 +117,8 @@ error[E0502]: cannot borrow value as mutable because it is also borrowed as immu --> $DIR/borrowck-pat-at-and-box.rs:62:9 | LL | ref mut a @ box ref b => { - | ^^^^^^^^^^^^^^^^----- - | | | - | | immutable borrow occurs here + | ^^^^^^^^^ ----- immutable borrow occurs here + | | | mutable borrow occurs here ... LL | drop(b); @@ -133,9 +128,8 @@ error[E0502]: cannot borrow value as mutable because it is also borrowed as immu --> $DIR/borrowck-pat-at-and-box.rs:54:11 | LL | fn f5(ref mut a @ box ref b: Box<NC>) { - | ^^^^^^^^^^^^^^^^----- - | | | - | | immutable borrow occurs here + | ^^^^^^^^^ ----- immutable borrow occurs here + | | | mutable borrow occurs here ... LL | drop(b); diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr index bc2c1625f..a9e66de08 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr @@ -262,9 +262,8 @@ error[E0382]: use of partially moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:9 | LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U); - | ^^^^^^^^^^^^^^^^^^^^^^^^---------^ - | | | - | | value partially moved here + | ^ - value partially moved here + | | | value used here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait @@ -273,9 +272,8 @@ error[E0382]: use of partially moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:9 | LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u()); - | ^^^^^^^^^^^^^^^^^^^^^^^^---------^ - | | | - | | value partially moved here + | ^ - value partially moved here + | | | value used here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait @@ -286,10 +284,7 @@ error[E0382]: use of moved value LL | match Some((U, U)) { | ------------ move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} - | -----------------------------^^^^^^^^^-- - | | | - | | value used here after move - | value moved here + | - value moved here ^ value used here after move error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:55:30 @@ -297,9 +292,8 @@ error[E0382]: borrow of moved value LL | match Some([U, U]) { | ------------ move occurs because value has type `Option<[U; 2]>`, which does not implement the `Copy` trait LL | mut a @ Some([ref b, ref mut c]) => {} - | ---------------------^^^^^^^^^-- - | | | - | | value borrowed here after move + | ----- ^^^^^^^^^ value borrowed here after move + | | | value moved here error[E0382]: borrow of moved value @@ -308,9 +302,8 @@ error[E0382]: borrow of moved value LL | match Some(u()) { | --------- move occurs because value has type `Option<U>`, which does not implement the `Copy` trait LL | a @ Some(ref b) => {} - | ---------^^^^^- - | | | - | | value borrowed here after move + | - ^^^^^ value borrowed here after move + | | | value moved here error[E0382]: use of moved value @@ -319,10 +312,7 @@ error[E0382]: use of moved value LL | match Some((u(), u())) { | ---------------- move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} - | -----------------------------^^^^^^^^^-- - | | | - | | value used here after move - | value moved here + | - value moved here ^ value used here after move error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:75:30 @@ -330,18 +320,16 @@ error[E0382]: borrow of moved value LL | match Some([u(), u()]) { | ---------------- move occurs because value has type `Option<[U; 2]>`, which does not implement the `Copy` trait LL | mut a @ Some([ref b, ref mut c]) => {} - | ---------------------^^^^^^^^^-- - | | | - | | value borrowed here after move + | ----- ^^^^^^^^^ value borrowed here after move + | | | value moved here error[E0382]: use of partially moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:11 | LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {} - | ^^^^^^^^^^^^^^^^^^^^-------------^ - | | | - | | value partially moved here + | ^^^^^ ----- value partially moved here + | | | value used here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr index c019aae3d..b2f22fe86 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr @@ -237,9 +237,8 @@ error[E0382]: borrow of partially moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:30:9 | LL | let ref mut a @ [b, mut c] = [U, U]; - | ^^^^^^^^^^^^^^^^-----^ - | | | - | | value partially moved here + | ^^^^^^^^^ ----- value partially moved here + | | | value borrowed here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait @@ -248,7 +247,7 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:33:9 | LL | let ref a @ b = u(); - | ^^^^^^^^- --- move occurs because value has type `U`, which does not implement the `Copy` trait + | ^^^^^ - --- move occurs because value has type `U`, which does not implement the `Copy` trait | | | | | value moved here | value borrowed here after move @@ -257,9 +256,8 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:36:18 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u()); - | ^^^^^^^^----- - | | | - | | value moved here + | ^^^^^ ----- value moved here + | | | value borrowed here after move | = note: move occurs because value has type `U`, which does not implement the `Copy` trait @@ -268,9 +266,8 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:36:33 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u()); - | ^^^^^^^^- - | | | - | | value moved here + | ^^^^^ - value moved here + | | | value borrowed here after move | = note: move occurs because value has type `U`, which does not implement the `Copy` trait @@ -279,9 +276,8 @@ error[E0382]: borrow of partially moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:42:9 | LL | let ref mut a @ [b, mut c] = [u(), u()]; - | ^^^^^^^^^^^^^^^^-----^ - | | | - | | value partially moved here + | ^^^^^^^^^ ----- value partially moved here + | | | value borrowed here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait @@ -290,9 +286,8 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:69:23 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} - | ^^^^^^^^----- - | | | - | | value moved here + | ^^^^^ ----- value moved here + | | | value borrowed here after move | = note: move occurs because value has type `U`, which does not implement the `Copy` trait @@ -305,9 +300,8 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:69:38 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} - | ^^^^^^^^- - | | | - | | value moved here + | ^^^^^ - value moved here + | | | value borrowed here after move | = note: move occurs because value has type `U`, which does not implement the `Copy` trait @@ -320,9 +314,8 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:11:11 | LL | fn f1(ref a @ b: U) {} - | ^^^^^^^^- - | | | - | | value moved here + | ^^^^^ - value moved here + | | | value borrowed here after move | move occurs because value has type `U`, which does not implement the `Copy` trait @@ -330,9 +323,8 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:14:20 | LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {} - | ^^^^^^^^----- - | | | - | | value moved here + | ^^^^^ ----- value moved here + | | | value borrowed here after move | = note: move occurs because value has type `U`, which does not implement the `Copy` trait @@ -341,9 +333,8 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:14:35 | LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {} - | ^^^^^^^^- - | | | - | | value moved here + | ^^^^^ - value moved here + | | | value borrowed here after move | = note: move occurs because value has type `U`, which does not implement the `Copy` trait @@ -352,9 +343,8 @@ error[E0382]: borrow of partially moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:20:11 | LL | fn f3(ref mut a @ [b, mut c]: [U; 2]) {} - | ^^^^^^^^^^^^^^^^-----^ - | | | - | | value partially moved here + | ^^^^^^^^^ ----- value partially moved here + | | | value borrowed here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr index 2ae78d108..8546b4bb4 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr @@ -298,9 +298,8 @@ error[E0502]: cannot borrow value as immutable because it is also borrowed as mu --> $DIR/borrowck-pat-ref-mut-and-ref.rs:8:31 | LL | ref mut z @ &mut Some(ref a) => { - | ----------------------^^^^^- - | | | - | | immutable borrow occurs here + | --------- ^^^^^ immutable borrow occurs here + | | | mutable borrow occurs here ... LL | **z = None; @@ -310,9 +309,8 @@ error[E0502]: cannot borrow value as mutable because it is also borrowed as immu --> $DIR/borrowck-pat-ref-mut-and-ref.rs:46:9 | LL | let ref mut a @ ref b = u(); - | ^^^^^^^^^^^^----- - | | | - | | immutable borrow occurs here + | ^^^^^^^^^ ----- immutable borrow occurs here + | | | mutable borrow occurs here ... LL | drop(b); @@ -322,9 +320,8 @@ error[E0502]: cannot borrow value as immutable because it is also borrowed as mu --> $DIR/borrowck-pat-ref-mut-and-ref.rs:51:9 | LL | let ref a @ ref mut b = u(); - | ^^^^^^^^--------- - | | | - | | mutable borrow occurs here + | ^^^^^ --------- mutable borrow occurs here + | | | immutable borrow occurs here ... LL | *b = u(); @@ -334,9 +331,8 @@ error[E0502]: cannot borrow value as mutable because it is also borrowed as immu --> $DIR/borrowck-pat-ref-mut-and-ref.rs:76:20 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) => { - | -----------^^^^^^^^^- - | | | - | | mutable borrow occurs here + | ----- ^^^^^^^^^ mutable borrow occurs here + | | | immutable borrow occurs here ... LL | drop(a); @@ -346,9 +342,8 @@ error[E0502]: cannot borrow value as mutable because it is also borrowed as immu --> $DIR/borrowck-pat-ref-mut-and-ref.rs:76:45 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) => { - | ------------^^^^^^^^^- - | | | - | | mutable borrow occurs here + | ----- ^^^^^^^^^ mutable borrow occurs here + | | | immutable borrow occurs here ... LL | drop(a); @@ -406,9 +401,8 @@ error[E0502]: cannot borrow value as immutable because it is also borrowed as mu --> $DIR/borrowck-pat-ref-mut-and-ref.rs:117:9 | LL | let ref a @ (ref mut b, ref mut c) = (U, U); - | ^^^^^^^^^---------^^^^^^^^^^^^ - | | | - | | mutable borrow occurs here + | ^^^^^ --------- mutable borrow occurs here + | | | immutable borrow occurs here ... LL | *b = U; @@ -418,9 +412,8 @@ error[E0502]: cannot borrow value as immutable because it is also borrowed as mu --> $DIR/borrowck-pat-ref-mut-and-ref.rs:123:9 | LL | let ref a @ (ref mut b, ref mut c) = (U, U); - | ^^^^^^^^^---------^^^^^^^^^^^^ - | | | - | | mutable borrow occurs here + | ^^^^^ --------- mutable borrow occurs here + | | | immutable borrow occurs here ... LL | *b = U; @@ -430,9 +423,8 @@ error[E0502]: cannot borrow value as immutable because it is also borrowed as mu --> $DIR/borrowck-pat-ref-mut-and-ref.rs:129:9 | LL | let ref a @ (ref mut b, ref mut c) = (U, U); - | ^^^^^^^^^---------^^^^^^^^^^^^ - | | | - | | mutable borrow occurs here + | ^^^^^ --------- mutable borrow occurs here + | | | immutable borrow occurs here LL | LL | *b = U; @@ -442,9 +434,8 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-ref-mut-and-ref.rs:28:30 | LL | fn f4_also_moved(ref a @ ref mut b @ c: U) {} - | --------^^^^^^^^^^^^- - | | | | - | | | value moved here + | ----- ^^^^^^^^^ - value moved here + | | | | | value borrowed here after move | move occurs because value has type `U`, which does not implement the `Copy` trait diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr index aa0223041..384a57b2e 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr @@ -262,9 +262,8 @@ error[E0499]: cannot borrow value as mutable more than once at a time --> $DIR/borrowck-pat-ref-mut-twice.rs:29:9 | LL | let ref mut a @ ref mut b = U; - | ^^^^^^^^^^^^--------- - | | | - | | first mutable borrow occurs here + | ^^^^^^^^^ --------- first mutable borrow occurs here + | | | second mutable borrow occurs here ... LL | drop(b); @@ -274,9 +273,8 @@ error[E0499]: cannot borrow value as mutable more than once at a time --> $DIR/borrowck-pat-ref-mut-twice.rs:39:9 | LL | let ref mut a @ ref mut b = U; - | ^^^^^^^^^^^^--------- - | | | - | | first mutable borrow occurs here + | ^^^^^^^^^ --------- first mutable borrow occurs here + | | | second mutable borrow occurs here ... LL | *b = U; @@ -286,9 +284,8 @@ error[E0499]: cannot borrow value as mutable more than once at a time --> $DIR/borrowck-pat-ref-mut-twice.rs:89:24 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { - | ---------------^^^^^^^^^- - | | | - | | second mutable borrow occurs here + | --------- ^^^^^^^^^ second mutable borrow occurs here + | | | first mutable borrow occurs here ... LL | *a = Err(U); @@ -298,9 +295,8 @@ error[E0499]: cannot borrow value as mutable more than once at a time --> $DIR/borrowck-pat-ref-mut-twice.rs:89:53 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { - | ----------------^^^^^^^^^- - | | | - | | second mutable borrow occurs here + | --------- ^^^^^^^^^ second mutable borrow occurs here + | | | first mutable borrow occurs here ... LL | *a = Err(U); @@ -310,9 +306,8 @@ error[E0499]: cannot borrow value as mutable more than once at a time --> $DIR/borrowck-pat-ref-mut-twice.rs:101:24 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { - | ---------------^^^^^^^^^- - | | | - | | second mutable borrow occurs here + | --------- ^^^^^^^^^ second mutable borrow occurs here + | | | first mutable borrow occurs here ... LL | drop(a); @@ -322,9 +317,8 @@ error[E0499]: cannot borrow value as mutable more than once at a time --> $DIR/borrowck-pat-ref-mut-twice.rs:101:53 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { - | ----------------^^^^^^^^^- - | | | - | | second mutable borrow occurs here + | --------- ^^^^^^^^^ second mutable borrow occurs here + | | | first mutable borrow occurs here ... LL | drop(a); @@ -334,9 +328,8 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-ref-mut-twice.rs:21:34 | LL | fn f4_also_moved(ref mut a @ ref mut b @ c: U) {} - | ------------^^^^^^^^^^^^- - | | | | - | | | value moved here + | --------- ^^^^^^^^^ - value moved here + | | | | | value borrowed here after move | move occurs because value has type `U`, which does not implement the `Copy` trait diff --git a/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr b/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr index d290144b6..cd3234952 100644 --- a/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr +++ b/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr @@ -2,9 +2,8 @@ error[E0382]: use of partially moved value --> $DIR/copy-and-move-mixed.rs:12:9 | LL | let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C)); - | ^^^^^^^^^^------------^ - | | | - | | value partially moved here + | ^ - value partially moved here + | | | value used here after partial move | = note: partial move occurs because value has type `NC<C, C>`, which does not implement the `Copy` trait diff --git a/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr b/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr index d78faa682..840a513d6 100644 --- a/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr +++ b/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr @@ -48,7 +48,7 @@ error[E0382]: borrow of moved value --> $DIR/default-binding-modes-both-sides-independent.rs:29:9 | LL | let ref mut a @ b = NotCopy; - | ^^^^^^^^^^^^- ------- move occurs because value has type `NotCopy`, which does not implement the `Copy` trait + | ^^^^^^^^^ - ------- move occurs because value has type `NotCopy`, which does not implement the `Copy` trait | | | | | value moved here | value borrowed here after move diff --git a/src/test/ui/pattern/bindings-after-at/nested-binding-modes-mut.stderr b/src/test/ui/pattern/bindings-after-at/nested-binding-modes-mut.stderr index 3180bd0af..70beb5d42 100644 --- a/src/test/ui/pattern/bindings-after-at/nested-binding-modes-mut.stderr +++ b/src/test/ui/pattern/bindings-after-at/nested-binding-modes-mut.stderr @@ -11,7 +11,7 @@ error[E0596]: cannot borrow `not_mut` as mutable, as it is not declared as mutab --> $DIR/nested-binding-modes-mut.rs:9:5 | LL | let not_mut @ mut is_mut = 42; - | -------------------- help: consider changing this to be mutable: `mut not_mut` + | ------- help: consider changing this to be mutable: `mut not_mut` LL | &mut is_mut; LL | &mut not_mut; | ^^^^^^^^^^^^ cannot borrow as mutable |