fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.3 KiB46 linesraw
1error[E0503]: cannot use `e` because it was mutably borrowed
2  --> $DIR/match-on-borrowed.rs:49:9
3   |
4LL |         E::V(ref mut x, _) => x,
5   |              --------- borrow of `e.0` occurs here
6...
7LL |         E::V(_, r) => (),
8   |         ^^^^^^^^^^ use of borrowed `e.0`
9...
10LL |     x;
11   |     - borrow later used here
12
13error[E0503]: cannot use `*f` because it was mutably borrowed
14  --> $DIR/match-on-borrowed.rs:62:9
15   |
16LL |         E::V(ref mut x, _) => x,
17   |              --------- borrow of `f.0` occurs here
18...
19LL |         E::V(_, r) => (),
20   |         ^^^^^^^^^^ use of borrowed `f.0`
21...
22LL |     x;
23   |     - borrow later used here
24
25error[E0503]: cannot use `t` because it was mutably borrowed
26  --> $DIR/match-on-borrowed.rs:80:9
27   |
28LL |     let x = &mut t;
29   |             ------ borrow of `t` occurs here
30LL |     match t {
31LL |         true => (),
32   |         ^^^^ use of borrowed `t`
33...
34LL |     x;
35   |     - borrow later used here
36
37error[E0381]: use of possibly-uninitialized variable: `n`
38  --> $DIR/match-on-borrowed.rs:90:11
39   |
40LL |     match n {}
41   |           ^ use of possibly-uninitialized `n`
42
43error: aborting due to 4 previous errors
44
45Some errors have detailed explanations: E0381, E0503.
46For more information about an error, try `rustc --explain E0381`.