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;
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ - value is moved into `b` here
|
|
|
|
| |
|
2023-01-17 06:48:43 -06:00
|
|
|
| value is 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);
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ ----- - value is moved into `e` here
|
|
|
|
| | |
|
2023-01-17 06:48:43 -06:00
|
|
|
| | value is moved into `c` here
|
|
|
|
| value is 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);
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ ----- value is moved into `c` here
|
|
|
|
| |
|
2023-01-17 06:48:43 -06:00
|
|
|
| value is 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);
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ - value is moved into `e` here
|
|
|
|
| |
|
2023-01-17 06:48:43 -06:00
|
|
|
| value is 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];
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^^^^^ - ----- value is moved into `c` here
|
|
|
|
| | |
|
2023-01-17 06:48:43 -06:00
|
|
|
| | value is moved into `b` here
|
|
|
|
| value is mutably 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();
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ - value is moved into `b` here
|
|
|
|
| |
|
2023-01-17 06:48:43 -06:00
|
|
|
| value is 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());
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ ----- - value is moved into `e` here
|
|
|
|
| | |
|
2023-01-17 06:48:43 -06:00
|
|
|
| | value is moved into `c` here
|
|
|
|
| value is 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());
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ ----- value is moved into `c` here
|
|
|
|
| |
|
2023-01-17 06:48:43 -06:00
|
|
|
| value is 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());
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ - value is moved into `e` here
|
|
|
|
| |
|
2023-01-17 06:48:43 -06:00
|
|
|
| value is 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()];
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^^^^^ - ----- value is moved into `c` here
|
|
|
|
| | |
|
2023-01-17 06:48:43 -06:00
|
|
|
| | value is moved into `b` here
|
|
|
|
| value is mutably 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) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ - value is moved into `b` here
|
|
|
|
| |
|
2023-01-17 06:48:43 -06:00
|
|
|
| value is 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)) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ ----- - value is moved into `e` here
|
|
|
|
| | |
|
2023-01-17 06:48:43 -06:00
|
|
|
| | value is moved into `c` here
|
|
|
|
| value is 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)) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ ----- value is moved into `c` here
|
|
|
|
| |
|
2023-01-17 06:48:43 -06:00
|
|
|
| value is 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)) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ - value is moved into `e` here
|
|
|
|
| |
|
2023-01-17 06:48:43 -06:00
|
|
|
| value is 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]) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^^^^^ - ----- value is moved into `c` here
|
|
|
|
| | |
|
2023-01-17 06:48:43 -06:00
|
|
|
| | value is moved into `b` here
|
|
|
|
| value is mutably 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) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ - value is moved into `b` here
|
|
|
|
| |
|
2023-01-17 06:48:43 -06:00
|
|
|
| value is 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)) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ ----- - value is moved into `e` here
|
|
|
|
| | |
|
2023-01-17 06:48:43 -06:00
|
|
|
| | value is moved into `c` here
|
|
|
|
| value is 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)) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ ----- value is moved into `c` here
|
|
|
|
| |
|
2023-01-17 06:48:43 -06:00
|
|
|
| value is 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)) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^ - value is moved into `e` here
|
|
|
|
| |
|
2023-01-17 06:48:43 -06:00
|
|
|
| value is 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]) => {}
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^^^^^^^^^ - ----- value is moved into `c` here
|
|
|
|
| | |
|
2023-01-17 06:48:43 -06:00
|
|
|
| | value is moved into `b` here
|
|
|
|
| value is mutably 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
|
2022-11-02 23:22:24 -05:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let ref mut a @ [b, ref mut c] = [U, U];
|
|
|
|
| +++
|
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: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
|
2022-11-02 23:22:24 -05:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let ref a @ ref b = u();
|
|
|
|
| +++
|
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: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
|
2022-11-02 23:22:24 -05:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let ref a @ (ref b @ ref mut c, ref d @ e) = (u(), u());
|
|
|
|
| +++
|
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: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
|
2022-11-02 23:22:24 -05:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let ref a @ (ref b @ mut c, ref d @ ref e) = (u(), u());
|
|
|
|
| +++
|
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: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
|
2022-11-02 23:22:24 -05:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let ref mut a @ [b, ref mut c] = [u(), u()];
|
|
|
|
| +++
|
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: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
|
2022-11-02 23:22:24 -05:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
|
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
|
2022-11-02 23:22:24 -05:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
2020-11-01 12:35:55 -06:00
|
|
|
|
|
|
|
|
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
|
|
|
|
2023-02-16 04:06:59 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:11:11
|
|
|
|
|
|
|
|
|
LL | fn f1(ref a @ b: U) {}
|
|
|
|
| ^^^^^ - value is moved into `b` here
|
|
|
|
| |
|
|
|
|
| value is borrowed by `a` here
|
|
|
|
|
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-08 09:44:45 -05:00
|
|
|
| ^^^^^ - value moved here
|
|
|
|
| |
|
2020-11-01 12:35:55 -06:00
|
|
|
| value borrowed here after move
|
|
|
|
| move occurs because value has type `U`, which does not implement the `Copy` trait
|
|
|
|
|
2023-02-16 04:06:59 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:14:11
|
|
|
|
|
|
|
|
|
LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {}
|
|
|
|
| ^^^^^ ----- - value is moved into `e` here
|
|
|
|
| | |
|
|
|
|
| | value is moved into `c` here
|
|
|
|
| value is borrowed by `a` here
|
|
|
|
|
|
|
|
error: cannot move out of value because it is borrowed
|
|
|
|
--> $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 is moved into `c` here
|
|
|
|
| |
|
|
|
|
| value is borrowed by `b` here
|
|
|
|
|
|
|
|
error: cannot move out of value because it is borrowed
|
|
|
|
--> $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 is moved into `e` here
|
|
|
|
| |
|
|
|
|
| value is borrowed by `d` here
|
|
|
|
|
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: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
|
|
|
|
|
2023-02-16 04:06:59 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref.rs:20:11
|
|
|
|
|
|
|
|
|
LL | fn f3(ref mut a @ [b, mut c]: [U; 2]) {}
|
|
|
|
| ^^^^^^^^^ - ----- value is moved into `c` here
|
|
|
|
| | |
|
|
|
|
| | value is moved into `b` here
|
|
|
|
| value is mutably borrowed by `a` here
|
|
|
|
|
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: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`.
|