1 error[E0004]: non-exhaustive patterns: type `u8` is non-empty
2 --> $DIR/pattern-matching-should-fail.rs:70:23
4 LL | let c1 = || match x { };
7 = note: the matched value is of type `u8`
8 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
10 LL ~ let c1 = || match x {
15 error[E0381]: use of possibly-uninitialized variable: `x`
16 --> $DIR/pattern-matching-should-fail.rs:8:23
18 LL | let c1 = || match x { };
19 | ^ use of possibly-uninitialized `x`
21 error[E0381]: borrow of possibly-uninitialized variable: `x`
22 --> $DIR/pattern-matching-should-fail.rs:15:14
24 LL | let c2 = || match x { _ => () };
25 | ^^ - borrow occurs due to use in closure
27 | use of possibly-uninitialized `x`
29 error[E0381]: borrow of possibly-uninitialized variable: `variant`
30 --> $DIR/pattern-matching-should-fail.rs:27:13
33 | ^^ use of possibly-uninitialized `variant`
36 | ------- borrow occurs due to use in closure
38 error[E0381]: borrow of possibly-uninitialized variable: `variant`
39 --> $DIR/pattern-matching-should-fail.rs:39:13
42 | ^^ use of possibly-uninitialized `variant`
45 | ------- borrow occurs due to use in closure
47 error[E0381]: use of possibly-uninitialized variable: `g`
48 --> $DIR/pattern-matching-should-fail.rs:55:15
51 | ^ use of possibly-uninitialized `g`
53 error[E0381]: use of possibly-uninitialized variable: `t`
54 --> $DIR/pattern-matching-should-fail.rs:58:19
57 | ^ use of possibly-uninitialized `t`
59 error[E0381]: use of possibly-uninitialized variable: `x`
60 --> $DIR/pattern-matching-should-fail.rs:70:23
62 LL | let c1 = || match x { };
63 | ^ use of possibly-uninitialized `x`
65 error: aborting due to 8 previous errors
67 Some errors have detailed explanations: E0004, E0381.
68 For more information about an error, try `rustc --explain E0004`.