]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/match-on-borrowed.stderr
Rollup merge of #106397 - compiler-errors:new-solver-impl-wc, r=lcnr
[rust.git] / tests / ui / nll / match-on-borrowed.stderr
1 error[E0503]: cannot use `e` because it was mutably borrowed
2   --> $DIR/match-on-borrowed.rs:47:11
3    |
4 LL |         E::V(ref mut x, _) => x,
5    |              --------- borrow of `e.0` occurs here
6 ...
7 LL |     match e { // Don't know that E uses a tag for its discriminant
8    |           ^ use of borrowed `e.0`
9 ...
10 LL |     x;
11    |     - borrow later used here
12
13 error[E0503]: cannot use `*f` because it was mutably borrowed
14   --> $DIR/match-on-borrowed.rs:61:11
15    |
16 LL |         E::V(ref mut x, _) => x,
17    |              --------- borrow of `f.0` occurs here
18 ...
19 LL |     match f { // Don't know that E uses a tag for its discriminant
20    |           ^ use of borrowed `f.0`
21 ...
22 LL |     x;
23    |     - borrow later used here
24
25 error[E0503]: cannot use `t` because it was mutably borrowed
26   --> $DIR/match-on-borrowed.rs:81:5
27    |
28 LL |     let x = &mut t;
29    |             ------ borrow of `t` occurs here
30 LL |     match t {
31    |     ^^^^^^^ use of borrowed `t`
32 ...
33 LL |     x;
34    |     - borrow later used here
35
36 error[E0381]: used binding `n` isn't initialized
37   --> $DIR/match-on-borrowed.rs:93:11
38    |
39 LL |     let n: Never;
40    |         - binding declared here but left uninitialized
41 LL |     match n {}
42    |           ^ `n` used here but it isn't initialized
43    |
44 help: consider assigning a value
45    |
46 LL |     let n: Never = todo!();
47    |                  +++++++++
48
49 error: aborting due to 4 previous errors
50
51 Some errors have detailed explanations: E0381, E0503.
52 For more information about an error, try `rustc --explain E0381`.