1 error[E0004]: non-exhaustive patterns: `L1::B` not covered
2 --> $DIR/non-exhaustive-match.rs:26:25
4 LL | let _b = || { match l1 { L1::A => () } };
5 | ^^ pattern `L1::B` not covered
7 note: `L1` defined here
8 --> $DIR/non-exhaustive-match.rs:12:14
12 = note: the matched value is of type `L1`
13 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
15 LL | let _b = || { match l1 { L1::A => (), L1::B => todo!() } };
18 error[E0004]: non-exhaustive patterns: type `E1` is non-empty
19 --> $DIR/non-exhaustive-match.rs:37:25
21 LL | let _d = || { match e1 {} };
24 note: `E1` defined here
25 --> $DIR/auxiliary/match_non_exhaustive_lib.rs:2:1
29 = note: the matched value is of type `E1`, which is marked as non-exhaustive
30 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
32 LL ~ let _d = || { match e1 {
37 error[E0004]: non-exhaustive patterns: `_` not covered
38 --> $DIR/non-exhaustive-match.rs:39:25
40 LL | let _e = || { match e2 { E2::A => (), E2::B => () } };
41 | ^^ pattern `_` not covered
43 note: `E2` defined here
44 --> $DIR/auxiliary/match_non_exhaustive_lib.rs:5:1
46 LL | pub enum E2 { A, B }
48 = note: the matched value is of type `E2`, which is marked as non-exhaustive
49 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
51 LL | let _e = || { match e2 { E2::A => (), E2::B => (), _ => todo!() } };
54 error[E0505]: cannot move out of `e3` because it is borrowed
55 --> $DIR/non-exhaustive-match.rs:46:22
57 LL | let _g = || { match e3 { E3::C => (), _ => () } };
58 | -- -- borrow occurs due to use in closure
60 | borrow of `e3` occurs here
61 LL | let mut mut_e3 = e3;
62 | ^^ move out of `e3` occurs here
65 | -- borrow later used here
67 error: aborting due to 4 previous errors
69 Some errors have detailed explanations: E0004, E0505.
70 For more information about an error, try `rustc --explain E0004`.