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