rust/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr

352 lines
15 KiB
Plaintext
Raw Normal View History

error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:9
|
LL | let a @ ref b = U;
| -^^^-----
| | |
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `U` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:26:9
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
| -^^^^^^^^^^^^---------^^^^^^-----^
| | | |
| | | value borrowed here after move
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:26:14
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
| -----^^^---------
| | |
| | value borrowed here after move
| value moved into `b` here
| move occurs because `b` has type `U` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:26:33
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
| -^^^-----
| | |
| | value borrowed here after move
| value moved into `d` here
| move occurs because `d` has type `U` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:9
|
LL | let a @ [ref mut b, ref c] = [U, U];
| -^^^^---------^^-----^
| | | |
| | | value borrowed here after move
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:9
|
LL | let a @ ref b = u();
| -^^^-----
| | |
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `U` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:35:9
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
| -^^^^^^^^^^^^---------^^^^^^-----^
| | | |
| | | value borrowed here after move
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:35:14
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
| -----^^^---------
| | |
| | value borrowed here after move
| value moved into `b` here
| move occurs because `b` has type `U` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:35:33
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
| -^^^-----
| | |
| | value borrowed here after move
| value moved into `d` here
| move occurs because `d` has type `U` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:40:9
|
LL | let a @ [ref mut b, ref c] = [u(), u()];
| -^^^^---------^^-----^
| | | |
| | | value borrowed here after move
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:9
|
LL | a @ Some(ref b) => {}
| -^^^^^^^^-----^
| | |
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `Option<U>` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:49:9
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| -^^^^^^^^^^^^^^^^^---------^^^^^^-----^^
| | | |
| | | value borrowed here after move
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `Option<(U, U)>` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:49:19
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| -----^^^---------
| | |
| | value borrowed here after move
| value moved into `b` here
| move occurs because `b` has type `U` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:49:38
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| -^^^-----
| | |
| | value borrowed here after move
| value moved into `d` here
| move occurs because `d` has type `U` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:57:9
|
LL | mut a @ Some([ref b, ref mut c]) => {}
| -----^^^^^^^^^-----^^---------^^
| | | |
| | | value borrowed here after move
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `Option<[U; 2]>` which does not implement the `Copy` trait
error: borrow of moved value
2020-11-03 00:45:41 -06:00
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:63:9
|
LL | a @ Some(ref b) => {}
| -^^^^^^^^-----^
| | |
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `Option<U>` which does not implement the `Copy` trait
error: borrow of moved value
2020-11-03 00:45:41 -06:00
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:69:9
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| -^^^^^^^^^^^^^^^^^---------^^^^^^-----^^
| | | |
| | | value borrowed here after move
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `Option<(U, U)>` which does not implement the `Copy` trait
error: borrow of moved value
2020-11-03 00:45:41 -06:00
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:69:19
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| -----^^^---------
| | |
| | value borrowed here after move
| value moved into `b` here
| move occurs because `b` has type `U` which does not implement the `Copy` trait
error: borrow of moved value
2020-11-03 00:45:41 -06:00
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:69:38
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| -^^^-----
| | |
| | value borrowed here after move
| value moved into `d` here
| move occurs because `d` has type `U` which does not implement the `Copy` trait
error: borrow of moved value
2020-11-03 00:45:41 -06:00
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:77:9
|
LL | mut a @ Some([ref b, ref mut c]) => {}
| -----^^^^^^^^^-----^^---------^^
| | | |
| | | value borrowed here after move
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `Option<[U; 2]>` which does not implement the `Copy` trait
error: borrow of moved value
2020-08-30 13:59:56 -05:00
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:13:11
|
LL | fn f1(a @ ref b: U) {}
| -^^^-----
| | |
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `U` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:16:11
|
LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
| -----^^^^^^^^-----^^^^^^^^^^-----^
| | | |
| | | value borrowed here after move
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:16:20
|
LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
| -^^^-----
| | |
| | value borrowed here after move
| value moved into `b` here
| move occurs because `b` has type `U` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:16:31
|
LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
| -----^^^-----
| | |
| | value borrowed here after move
| value moved into `d` here
| move occurs because `d` has type `U` which does not implement the `Copy` trait
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:21:11
|
LL | fn f3(a @ [ref mut b, ref c]: [U; 2]) {}
| -^^^^---------^^-----^
| | | |
| | | value borrowed here after move
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait
error[E0382]: use of partially moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:26:9
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
2020-11-02 10:59:20 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^---------^
| | |
| | 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
error[E0382]: use of partially moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:35:9
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
2020-11-02 10:59:20 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^---------^
| | |
| | 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
2020-11-03 00:45:41 -06:00
error[E0382]: use of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:49:38
|
2020-11-03 00:45:41 -06:00
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)) => {}
2020-11-03 00:45:41 -06:00
| -----------------------------^^^^^^^^^--
2020-11-02 10:59:20 -06:00
| | |
2020-11-03 00:45:41 -06:00
| | value used here after move
| value moved here
error[E0382]: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:57:30
|
2020-11-03 00:45:41 -06:00
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 moved here
error[E0382]: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:63:18
|
2020-11-03 00:45:41 -06:00
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 moved here
2020-11-03 00:45:41 -06:00
error[E0382]: use of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:69:38
|
2020-11-03 00:45:41 -06:00
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)) => {}
2020-11-03 00:45:41 -06:00
| -----------------------------^^^^^^^^^--
2020-11-02 10:59:20 -06:00
| | |
2020-11-03 00:45:41 -06:00
| | value used here after move
| value moved here
error[E0382]: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:77:30
|
2020-11-03 00:45:41 -06:00
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 moved here
error[E0382]: use of partially moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:16:11
|
LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
2020-11-02 10:59:20 -06:00
| ^^^^^^^^^^^^^^^^^^^^-------------^
| | |
| | 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
2020-11-03 00:45:41 -06:00
error: aborting due to 33 previous errors
For more information about this error, try `rustc --explain E0382`.