]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/2229_closure_analysis/match/non-exhaustive-match.stderr
Tweak move error
[rust.git] / src / test / ui / closures / 2229_closure_analysis / match / non-exhaustive-match.stderr
1 error[E0004]: non-exhaustive patterns: `B` not covered
2   --> $DIR/non-exhaustive-match.rs:26:25
3    |
4 LL | enum L1 { A, B }
5    | ----------------
6    | |            |
7    | |            not covered
8    | `L1` defined here
9 ...
10 LL |     let _b = || { match l1 { L1::A => () } };
11    |                         ^^ pattern `B` not covered
12    |
13    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
14    = note: the matched value is of type `L1`
15
16 error[E0004]: non-exhaustive patterns: type `E1` is non-empty
17   --> $DIR/non-exhaustive-match.rs:37:25
18    |
19 LL |     let _d = || { match e1 {} };
20    |                         ^^
21    |
22    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
23    = note: the matched value is of type `E1`, which is marked as non-exhaustive
24
25 error[E0004]: non-exhaustive patterns: `_` not covered
26   --> $DIR/non-exhaustive-match.rs:39:25
27    |
28 LL |     let _e = || { match e2 { E2::A => (), E2::B => () } };
29    |                         ^^ pattern `_` not covered
30    |
31    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
32    = note: the matched value is of type `E2`, which is marked as non-exhaustive
33
34 error[E0505]: cannot move out of `e3` because it is borrowed
35   --> $DIR/non-exhaustive-match.rs:46:22
36    |
37 LL |     let _g = || { match e3 { E3::C => (), _ => () }  };
38    |              --         -- borrow occurs due to use in closure
39    |              |
40    |              borrow of `e3` occurs here
41 LL |     let mut mut_e3 = e3;
42    |                      ^^ move out of `e3` occurs here
43 LL |
44 LL |     _g();
45    |     -- borrow later used here
46
47 error: aborting due to 4 previous errors
48
49 Some errors have detailed explanations: E0004, E0505.
50 For more information about an error, try `rustc --explain E0004`.