2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:24:9
|
2019-11-11 04:39:52 -06:00
|
|
|
|
|
2020-01-18 19:47:01 -06:00
|
|
|
LL | let ref a @ b = U;
|
|
|
|
| -----^^^-
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2019-11-11 04:39:52 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:26:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let ref a @ (ref b @ mut c, ref d @ e) = (U, U);
|
|
|
|
| -----^^^^^^^^^^^^-----^^^^^^^^^^-^
|
|
|
|
| | | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | | value moved into `e` here
|
|
|
|
| | value moved into `c` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:26:18
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let ref a @ (ref b @ mut c, ref d @ e) = (U, U);
|
|
|
|
| -----^^^-----
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `c` here
|
|
|
|
| value borrowed, by `b`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:26:33
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let ref a @ (ref b @ mut c, ref d @ e) = (U, U);
|
|
|
|
| -----^^^-
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `e` here
|
|
|
|
| value borrowed, by `d`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:30:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let ref mut a @ [b, mut c] = [U, U];
|
|
|
|
| ---------^^^^-^^-----^
|
|
|
|
| | | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | | value moved into `c` here
|
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:33:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let ref a @ b = u();
|
|
|
|
| -----^^^-
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:36:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u());
|
|
|
|
| -----^^^^^^^^^^^^-----^^^^^^^^^^-^
|
|
|
|
| | | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | | value moved into `e` here
|
|
|
|
| | value moved into `c` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:36:18
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u());
|
|
|
|
| -----^^^-----
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `c` here
|
|
|
|
| value borrowed, by `b`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:36:33
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u());
|
|
|
|
| -----^^^-
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `e` here
|
|
|
|
| value borrowed, by `d`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:42:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let ref mut a @ [b, mut c] = [u(), u()];
|
|
|
|
| ---------^^^^-^^-----^
|
|
|
|
| | | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | | value moved into `c` here
|
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:47:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | ref a @ Some(b) => {}
|
|
|
|
| -----^^^^^^^^-^
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:52:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {}
|
|
|
|
| -----^^^^^^^^^^^^^^^^^-----^^^^^^^^^^-^^
|
|
|
|
| | | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | | value moved into `e` here
|
|
|
|
| | value moved into `c` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:52:23
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {}
|
|
|
|
| -----^^^-----
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `c` here
|
|
|
|
| value borrowed, by `b`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:52:38
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {}
|
|
|
|
| -----^^^-
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `e` here
|
|
|
|
| value borrowed, by `d`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:59:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | ref mut a @ Some([b, mut c]) => {}
|
|
|
|
| ---------^^^^^^^^^-^^-----^^
|
|
|
|
| | | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | | value moved into `c` here
|
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:64:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | ref a @ Some(b) => {}
|
|
|
|
| -----^^^^^^^^-^
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:69:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {}
|
|
|
|
| -----^^^^^^^^^^^^^^^^^-----^^^^^^^^^^-^^
|
|
|
|
| | | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | | value moved into `e` here
|
|
|
|
| | value moved into `c` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:69:23
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {}
|
|
|
|
| -----^^^-----
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `c` here
|
|
|
|
| value borrowed, by `b`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:69:38
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {}
|
|
|
|
| -----^^^-
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `e` here
|
|
|
|
| value borrowed, by `d`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:78:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | ref mut a @ Some([b, mut c]) => {}
|
|
|
|
| ---------^^^^^^^^^-^^-----^^
|
|
|
|
| | | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | | value moved into `c` here
|
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:11:11
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | fn f1(ref a @ b: U) {}
|
|
|
|
| -----^^^-
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:14:11
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {}
|
|
|
|
| -----^^^^^^^^^^^^-----^^^^^^^^^^-^
|
|
|
|
| | | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | | value moved into `e` here
|
|
|
|
| | value moved into `c` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:14:20
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {}
|
|
|
|
| -----^^^-----
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `c` here
|
|
|
|
| value borrowed, by `b`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:14:35
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {}
|
|
|
|
| -----^^^-
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `e` here
|
|
|
|
| value borrowed, by `d`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:20:11
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | fn f3(ref mut a @ [b, mut c]: [U; 2]) {}
|
|
|
|
| ---------^^^^-^^-----^
|
|
|
|
| | | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | | value moved into `c` here
|
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-11-01 12:35:55 -06:00
|
|
|
error[E0382]: borrow of partially moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:30:9
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
|
LL | let ref mut a @ [b, mut c] = [U, U];
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^^^^^^^^^ ----- value partially moved here
|
|
|
|
| |
|
2020-11-01 12:35:55 -06:00
|
|
|
| value borrowed here after partial move
|
|
|
|
|
|
|
|
|
= note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:33:9
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
|
LL | let ref a @ b = u();
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^^^^^ - --- move occurs because value has type `U`, which does not implement the `Copy` trait
|
2020-11-01 12:35:55 -06:00
|
|
|
| | |
|
|
|
|
| | value moved here
|
|
|
|
| value borrowed here after move
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:36:18
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
|
LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u());
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^^^^^ ----- value moved here
|
|
|
|
| |
|
2020-11-01 12:35:55 -06:00
|
|
|
| value borrowed here after move
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:36:33
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
|
LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u());
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^^^^^ - value moved here
|
|
|
|
| |
|
2020-11-01 12:35:55 -06:00
|
|
|
| value borrowed here after move
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: borrow of partially moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:42:9
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
|
LL | let ref mut a @ [b, mut c] = [u(), u()];
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^^^^^^^^^ ----- value partially moved here
|
|
|
|
| |
|
2020-11-01 12:35:55 -06:00
|
|
|
| value borrowed here after partial move
|
|
|
|
|
|
|
|
|
= note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:69:23
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
|
LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {}
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^^^^^ ----- value moved here
|
|
|
|
| |
|
2020-11-01 12:35:55 -06:00
|
|
|
| value borrowed here after move
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `U`, which does not implement the `Copy` trait
|
|
|
|
help: borrow this field in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref a @ Some((ref b @ ref mut c, ref d @ e)) => {}
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:69:38
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
|
LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {}
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^^^^^ - value moved here
|
|
|
|
| |
|
2020-11-01 12:35:55 -06:00
|
|
|
| value borrowed here after move
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `U`, which does not implement the `Copy` trait
|
|
|
|
help: borrow this field in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref a @ Some((ref b @ mut c, ref d @ ref e)) => {}
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:11:11
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
|
LL | fn f1(ref a @ b: U) {}
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^^^^^----
|
2020-11-01 12:35:55 -06:00
|
|
|
| | |
|
|
|
|
| | value moved here
|
|
|
|
| value borrowed here after move
|
|
|
|
| move occurs because value has type `U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:14:20
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
|
LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {}
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^^^^^ ----- value moved here
|
|
|
|
| |
|
2020-11-01 12:35:55 -06:00
|
|
|
| value borrowed here after move
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:14:35
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
|
LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {}
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^^^^^ - value moved here
|
|
|
|
| |
|
2020-11-01 12:35:55 -06:00
|
|
|
| value borrowed here after move
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `U`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0382]: borrow of partially moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:20:11
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
|
LL | fn f3(ref mut a @ [b, mut c]: [U; 2]) {}
|
2022-09-03 17:55:53 -05:00
|
|
|
| ^^^^^^^^^ ----- value partially moved here
|
|
|
|
| |
|
2020-11-01 12:35:55 -06:00
|
|
|
| value borrowed 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 36 previous errors
|
2019-11-11 04:39:52 -06:00
|
|
|
|
2020-11-01 12:35:55 -06:00
|
|
|
For more information about this error, try `rustc --explain E0382`.
|