2018-12-13 20:53:07 +00:00
|
|
|
error[E0503]: cannot use `e` because it was mutably borrowed
|
2021-07-23 22:55:36 +00:00
|
|
|
--> $DIR/match-on-borrowed.rs:47:11
|
2018-12-13 20:53:07 +00:00
|
|
|
|
|
|
|
|
LL | E::V(ref mut x, _) => x,
|
2023-01-15 03:06:44 +00:00
|
|
|
| --------- `e.0` is borrowed here
|
2018-12-13 20:53:07 +00:00
|
|
|
...
|
2021-07-23 22:55:36 +00:00
|
|
|
LL | match e { // Don't know that E uses a tag for its discriminant
|
|
|
|
| ^ use of borrowed `e.0`
|
2018-12-13 20:53:07 +00:00
|
|
|
...
|
|
|
|
LL | x;
|
|
|
|
| - borrow later used here
|
|
|
|
|
|
|
|
error[E0503]: cannot use `*f` because it was mutably borrowed
|
2021-07-23 22:55:36 +00:00
|
|
|
--> $DIR/match-on-borrowed.rs:61:11
|
2018-12-13 20:53:07 +00:00
|
|
|
|
|
|
|
|
LL | E::V(ref mut x, _) => x,
|
2023-01-15 03:06:44 +00:00
|
|
|
| --------- `f.0` is borrowed here
|
2018-12-13 20:53:07 +00:00
|
|
|
...
|
2021-07-23 22:55:36 +00:00
|
|
|
LL | match f { // Don't know that E uses a tag for its discriminant
|
|
|
|
| ^ use of borrowed `f.0`
|
2018-12-13 20:53:07 +00:00
|
|
|
...
|
|
|
|
LL | x;
|
|
|
|
| - borrow later used here
|
|
|
|
|
2018-09-13 21:04:00 +00:00
|
|
|
error[E0503]: cannot use `t` because it was mutably borrowed
|
2021-07-23 22:55:36 +00:00
|
|
|
--> $DIR/match-on-borrowed.rs:81:5
|
2018-09-13 21:04:00 +00:00
|
|
|
|
|
|
|
|
LL | let x = &mut t;
|
2023-01-15 03:06:44 +00:00
|
|
|
| ------ `t` is borrowed here
|
2018-09-13 21:04:00 +00:00
|
|
|
LL | match t {
|
2021-07-23 22:55:36 +00:00
|
|
|
| ^^^^^^^ use of borrowed `t`
|
2018-09-13 21:04:00 +00:00
|
|
|
...
|
|
|
|
LL | x;
|
|
|
|
| - borrow later used here
|
|
|
|
|
2022-06-21 22:54:17 +00:00
|
|
|
error[E0381]: used binding `n` isn't initialized
|
2021-07-23 22:55:36 +00:00
|
|
|
--> $DIR/match-on-borrowed.rs:93:11
|
2018-09-13 21:04:00 +00:00
|
|
|
|
|
2022-06-21 18:57:45 +00:00
|
|
|
LL | let n: Never;
|
2022-06-21 22:54:17 +00:00
|
|
|
| - binding declared here but left uninitialized
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | match n {}
|
2022-06-21 18:57:45 +00:00
|
|
|
| ^ `n` used here but it isn't initialized
|
2022-09-23 07:28:48 +00:00
|
|
|
|
|
|
|
|
help: consider assigning a value
|
|
|
|
|
|
|
|
|
LL | let n: Never = todo!();
|
|
|
|
| +++++++++
|
2018-09-13 21:04:00 +00:00
|
|
|
|
2018-12-13 20:53:07 +00:00
|
|
|
error: aborting due to 4 previous errors
|
2018-09-13 21:04:00 +00:00
|
|
|
|
2019-04-17 17:26:38 +00:00
|
|
|
Some errors have detailed explanations: E0381, E0503.
|
2018-09-13 21:04:00 +00:00
|
|
|
For more information about an error, try `rustc --explain E0381`.
|