2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:29:9
|
|
|
|
|
|
|
|
|
LL | let a @ ref b = U;
|
|
|
|
| -^^^-----
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `main::U` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:9
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
|
|
|
|
| -^^^^^^^^^^^^---------^^^^^^-----^
|
|
|
|
| | | |
|
|
|
|
| | | value borrowed here after move
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `(main::U, main::U)` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:14
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
|
|
|
|
| -----^^^---------
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `b` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `b` has type `main::U` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:33
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
|
|
|
|
| -^^^-----
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `d` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `d` has type `main::U` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:38:9
|
|
|
|
|
|
|
|
|
LL | let a @ [ref mut b, ref c] = [U, U];
|
|
|
|
| -^^^^---------^^-----^
|
|
|
|
| | | |
|
|
|
|
| | | value borrowed here after move
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `[main::U; 2]` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:41:9
|
|
|
|
|
|
|
|
|
LL | let a @ ref b = u();
|
|
|
|
| -^^^-----
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `main::U` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:9
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
|
|
|
|
| -^^^^^^^^^^^^---------^^^^^^-----^
|
|
|
|
| | | |
|
|
|
|
| | | value borrowed here after move
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `(main::U, main::U)` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:14
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
|
|
|
|
| -----^^^---------
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `b` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `b` has type `main::U` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:33
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
|
|
|
|
| -^^^-----
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `d` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `d` has type `main::U` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:51:9
|
|
|
|
|
|
|
|
|
LL | let a @ [ref mut b, ref c] = [u(), u()];
|
|
|
|
| -^^^^---------^^-----^
|
|
|
|
| | | |
|
|
|
|
| | | value borrowed here after move
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `[main::U; 2]` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:56:9
|
|
|
|
|
|
|
|
|
LL | a @ Some(ref b) => {}
|
|
|
|
| -^^^^^^^^-----^
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `std::option::Option<main::U>` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:9
|
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| -^^^^^^^^^^^^^^^^^---------^^^^^^-----^^
|
|
|
|
| | | |
|
|
|
|
| | | value borrowed here after move
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `std::option::Option<(main::U, main::U)>` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:19
|
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| -----^^^---------
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `b` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `b` has type `main::U` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:38
|
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| -^^^-----
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `d` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `d` has type `main::U` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:71:9
|
|
|
|
|
|
|
|
|
LL | mut a @ Some([ref b, ref mut c]) => {}
|
|
|
|
| -----^^^^^^^^^-----^^---------^^
|
|
|
|
| | | |
|
|
|
|
| | | value borrowed here after move
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `std::option::Option<[main::U; 2]>` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:77:9
|
|
|
|
|
|
|
|
|
LL | a @ Some(ref b) => {}
|
|
|
|
| -^^^^^^^^-----^
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `std::option::Option<main::U>` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:9
|
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| -^^^^^^^^^^^^^^^^^---------^^^^^^-----^^
|
|
|
|
| | | |
|
|
|
|
| | | value borrowed here after move
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `std::option::Option<(main::U, main::U)>` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:19
|
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| -----^^^---------
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `b` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `b` has type `main::U` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:38
|
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| -^^^-----
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `d` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `d` has type `main::U` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:93:9
|
|
|
|
|
|
|
|
|
LL | mut a @ Some([ref b, ref mut c]) => {}
|
|
|
|
| -----^^^^^^^^^-----^^---------^^
|
|
|
|
| | | |
|
|
|
|
| | | value borrowed here after move
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `std::option::Option<[main::U; 2]>` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:11
|
|
|
|
|
|
|
|
|
LL | fn f1(a @ ref b: U) {}
|
|
|
|
| -^^^-----
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `main::U` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18: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
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `(main::U, main::U)` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:20
|
|
|
|
|
|
|
|
|
LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
|
|
|
|
| -^^^-----
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `b` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `b` has type `main::U` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:31
|
|
|
|
|
|
|
|
|
LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
|
|
|
|
| -----^^^-----
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `d` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `d` has type `main::U` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:25:11
|
|
|
|
|
|
|
|
|
LL | fn f3(a @ [ref mut b, ref c]: [U; 2]) {}
|
|
|
|
| -^^^^---------^^-----^
|
|
|
|
| | | |
|
|
|
|
| | | value borrowed here after move
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-02-21 07:49:51 -06:00
|
|
|
| move occurs because `a` has type `[main::U; 2]` which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:22
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
|
|
|
|
| --------^^^^^^^^^
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `main::U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: use of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:33
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
|
|
|
|
| ------------------------^^^^^^^^^- ------ move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait
|
|
|
|
| | |
|
|
|
|
| | value used here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:37
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
|
|
|
|
| ----^^^^^
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `main::U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:38:25
|
|
|
|
|
|
|
|
|
LL | let a @ [ref mut b, ref c] = [U, U];
|
|
|
|
| ----------------^^^^^- ------ move occurs because value has type `[main::U; 2]`, which does not implement the `Copy` trait
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:41:13
|
|
|
|
|
|
|
|
|
LL | let a @ ref b = u();
|
|
|
|
| ----^^^^^ --- move occurs because value has type `main::U`, which does not implement the `Copy` trait
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:22
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
|
|
|
|
| --------^^^^^^^^^
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `main::U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: use of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:33
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
|
|
|
|
| ------------------------^^^^^^^^^- ---------- move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait
|
|
|
|
| | |
|
|
|
|
| | value used here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:37
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
|
|
|
|
| ----^^^^^
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `main::U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:51:25
|
|
|
|
|
|
|
|
|
LL | let a @ [ref mut b, ref c] = [u(), u()];
|
|
|
|
| ----------------^^^^^- ---------- move occurs because value has type `[main::U; 2]`, which does not implement the `Copy` trait
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:27
|
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| --------^^^^^^^^^
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `main::U`, which does not implement the `Copy` trait
|
2020-06-20 00:45:09 -05:00
|
|
|
help: borrow this field in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | a @ Some((ref mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| ^^^
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
error[E0382]: use of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:38
|
|
|
|
|
|
|
|
|
LL | match Some((U, U)) {
|
|
|
|
| ------------ move occurs because value has type `std::option::Option<(main::U, main::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
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:42
|
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| ----^^^^^
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `main::U`, which does not implement the `Copy` trait
|
2020-06-20 00:45:09 -05:00
|
|
|
help: borrow this field in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, ref d @ ref e)) => {}
|
|
|
|
| ^^^
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:71:30
|
|
|
|
|
|
|
|
|
LL | match Some([U, U]) {
|
|
|
|
| ------------ move occurs because value has type `std::option::Option<[main::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:77:18
|
|
|
|
|
|
|
|
|
LL | match Some(u()) {
|
|
|
|
| --------- move occurs because value has type `std::option::Option<main::U>`, which does not implement the `Copy` trait
|
|
|
|
LL | a @ Some(ref b) => {}
|
|
|
|
| ---------^^^^^-
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:27
|
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| --------^^^^^^^^^
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `main::U`, which does not implement the `Copy` trait
|
2020-06-20 00:45:09 -05:00
|
|
|
help: borrow this field in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | a @ Some((ref mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| ^^^
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
error[E0382]: use of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:38
|
|
|
|
|
|
|
|
|
LL | match Some((u(), u())) {
|
|
|
|
| ---------------- move occurs because value has type `std::option::Option<(main::U, main::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
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:42
|
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| ----^^^^^
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `main::U`, which does not implement the `Copy` trait
|
2020-06-20 00:45:09 -05:00
|
|
|
help: borrow this field in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, ref d @ ref e)) => {}
|
|
|
|
| ^^^
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:93:30
|
|
|
|
|
|
|
|
|
LL | match Some([u(), u()]) {
|
|
|
|
| ---------------- move occurs because value has type `std::option::Option<[main::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:14:15
|
|
|
|
|
|
|
|
|
LL | fn f1(a @ ref b: U) {}
|
|
|
|
| ----^^^^^
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
| move occurs because value has type `main::U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:24
|
|
|
|
|
|
|
|
|
LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
|
|
|
|
| ----^^^^^
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `main::U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: use of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:31
|
|
|
|
|
|
|
|
|
LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
|
|
|
|
| --------------------^^^^^^^^^^^^^-
|
|
|
|
| | |
|
|
|
|
| | value used here after move
|
|
|
|
| value moved here
|
|
|
|
| move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:39
|
|
|
|
|
|
|
|
|
LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
|
|
|
|
| --------^^^^^
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `main::U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:25:27
|
|
|
|
|
|
|
|
|
LL | fn f3(a @ [ref mut b, ref c]: [U; 2]) {}
|
|
|
|
| ----------------^^^^^-
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
|
|
|
| value moved here
|
|
|
|
| move occurs because value has type `[main::U; 2]`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error: aborting due to 48 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|