2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:22:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let a @ ref b = U;
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ ----- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `a` has type `U` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let ref a @ ref b = U;
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ --------- ----- value borrowed here after move
|
|
|
|
| | |
|
2020-01-18 19:47:01 -06:00
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let ref a @ (mut b @ ref mut c, d @ ref e) = (U, U);
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:14
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ --------- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `b` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `b` has type `U` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let a @ (ref mut b @ ref mut c, d @ ref e) = (U, U);
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:33
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ ----- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `d` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `d` has type `U` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, ref d @ ref e) = (U, U);
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:29:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let a @ [ref mut b, ref c] = [U, U];
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ --------- ----- value borrowed here after move
|
|
|
|
| | |
|
2020-01-18 19:47:01 -06:00
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let ref a @ [ref mut b, ref c] = [U, U];
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let a @ ref b = u();
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ ----- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `a` has type `U` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let ref a @ ref b = u();
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ --------- ----- value borrowed here after move
|
|
|
|
| | |
|
2020-01-18 19:47:01 -06:00
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let ref a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:14
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ --------- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `b` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `b` has type `U` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let a @ (ref mut b @ ref mut c, d @ ref e) = (u(), u());
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:33
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ ----- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `d` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `d` has type `U` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, ref d @ ref e) = (u(), u());
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:38:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let a @ [ref mut b, ref c] = [u(), u()];
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ --------- ----- value borrowed here after move
|
|
|
|
| | |
|
2020-01-18 19:47:01 -06:00
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let ref a @ [ref mut b, ref c] = [u(), u()];
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:42:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | a @ Some(ref b) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ ----- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `a` has type `Option<U>` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref a @ Some(ref b) => {}
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ --------- ----- value borrowed here after move
|
|
|
|
| | |
|
2020-01-18 19:47:01 -06:00
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `a` has type `Option<(U, U)>` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:19
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ --------- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `b` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `b` has type `U` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding 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
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:38
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ ----- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `d` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `d` has type `U` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding 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
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:55:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | mut a @ Some([ref b, ref mut c]) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ ----- --------- value borrowed here after move
|
|
|
|
| | |
|
2020-01-18 19:47:01 -06:00
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `a` has type `Option<[U; 2]>` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref mut a @ Some([ref b, ref mut c]) => {}
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | a @ Some(ref b) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ ----- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `a` has type `Option<U>` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref a @ Some(ref b) => {}
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ --------- ----- value borrowed here after move
|
|
|
|
| | |
|
2020-01-18 19:47:01 -06:00
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `a` has type `Option<(U, U)>` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:19
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ --------- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `b` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `b` has type `U` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding 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
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:38
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ ----- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `d` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `d` has type `U` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding 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
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:75:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | mut a @ Some([ref b, ref mut c]) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ ----- --------- value borrowed here after move
|
|
|
|
| | |
|
2020-01-18 19:47:01 -06:00
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `a` has type `Option<[U; 2]>` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref mut a @ Some([ref b, ref mut c]) => {}
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-11-01 12:35:55 -06:00
|
|
|
error[E0382]: use of partially moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^ - value partially moved here
|
|
|
|
| |
|
2020-11-01 12:35:55 -06:00
|
|
|
| value used here after partial move
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
2020-11-01 12:35:55 -06:00
|
|
|
= note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
|
2022-11-02 23:22:24 -05:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
2022-11-15 11:01:20 -06:00
|
|
|
LL | let ref a @ (mut b @ ref mut c, ref d @ ref e) = (U, U);
|
|
|
|
| +++ +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-11-01 12:35:55 -06:00
|
|
|
error[E0382]: use of partially moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^ - value partially moved here
|
|
|
|
| |
|
2020-11-01 12:35:55 -06:00
|
|
|
| value used here after partial move
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
2020-11-01 12:35:55 -06:00
|
|
|
= note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
|
2022-11-02 23:22:24 -05:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
2022-11-15 11:01:20 -06:00
|
|
|
LL | let ref a @ (mut b @ ref mut c, ref d @ ref e) = (u(), u());
|
|
|
|
| +++ +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-11-03 00:45:41 -06:00
|
|
|
error[E0382]: use of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:38
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
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
|
2020-01-18 19:47:01 -06:00
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
2022-09-03 17:55:53 -05:00
|
|
|
| - value moved here ^ value used here after move
|
2022-11-02 23:22:24 -05:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| +++
|
2020-11-03 00:45:41 -06:00
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:55:30
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
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]) => {}
|
2022-09-03 17:55:53 -05:00
|
|
|
| ----- ^^^^^^^^^ value borrowed here after move
|
|
|
|
| |
|
2020-11-03 00:45:41 -06:00
|
|
|
| value moved here
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:18
|
2020-06-20 00:45:09 -05:00
|
|
|
|
|
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) => {}
|
2022-09-03 17:55:53 -05:00
|
|
|
| - ^^^^^ value borrowed here after move
|
|
|
|
| |
|
2020-11-03 00:45:41 -06:00
|
|
|
| value moved here
|
2022-11-02 23:22:24 -05:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref a @ Some(ref b) => {}
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-11-03 00:45:41 -06:00
|
|
|
error[E0382]: use of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:38
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
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
|
2020-01-18 19:47:01 -06:00
|
|
|
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
2022-09-03 17:55:53 -05:00
|
|
|
| - value moved here ^ value used here after move
|
2022-11-02 23:22:24 -05:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref a @ Some((mut b @ ref mut c, d @ ref e)) => {}
|
|
|
|
| +++
|
2020-11-03 00:45:41 -06:00
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:75:30
|
2020-06-20 00:45:09 -05:00
|
|
|
|
|
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]) => {}
|
2022-09-03 17:55:53 -05:00
|
|
|
| ----- ^^^^^^^^^ value borrowed here after move
|
|
|
|
| |
|
2020-11-03 00:45:41 -06:00
|
|
|
| value moved here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2023-02-16 04:06:59 -06:00
|
|
|
error: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:11: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
|
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | fn f1(ref a @ ref b: U) {}
|
|
|
|
| +++
|
|
|
|
|
|
|
|
error: borrow of 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 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
|
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | fn f2(ref mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
|
|
|
|
| +++
|
|
|
|
|
|
|
|
error: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14: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
|
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | fn f2(mut a @ (ref b @ ref c, mut d @ ref e): (U, U)) {}
|
|
|
|
| +++
|
|
|
|
|
|
|
|
error: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14: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
|
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | fn f2(mut a @ (b @ ref c, ref mut d @ ref e): (U, U)) {}
|
|
|
|
| +++
|
|
|
|
|
2020-11-01 12:35:55 -06:00
|
|
|
error[E0382]: use of partially moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:11
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^^^^^ ----- value partially moved here
|
|
|
|
| |
|
2020-11-01 12:35:55 -06:00
|
|
|
| value used here after partial move
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
2020-11-01 12:35:55 -06:00
|
|
|
= note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2023-02-16 04:06:59 -06:00
|
|
|
error: borrow of moved value
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:19: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
|
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | fn f3(ref a @ [ref mut b, ref c]: [U; 2]) {}
|
|
|
|
| +++
|
|
|
|
|
2020-11-03 00:45:41 -06:00
|
|
|
error: aborting due to 33 previous errors
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|