]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.stderr
Auto merge of #94515 - estebank:tweak-move-error, r=davidtwco
[rust.git] / src / test / ui / closures / 2229_closure_analysis / match / pattern-matching-should-fail.stderr
1 error[E0004]: non-exhaustive patterns: type `u8` is non-empty
2   --> $DIR/pattern-matching-should-fail.rs:70:23
3    |
4 LL |     let c1 = || match x { };
5    |                       ^
6    |
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
9    |
10 LL ~     let c1 = || match x {
11 LL +         _ => todo!(),
12 LL ~     };
13    |
14
15 error[E0381]: use of possibly-uninitialized variable: `x`
16   --> $DIR/pattern-matching-should-fail.rs:8:23
17    |
18 LL |     let c1 = || match x { };
19    |                       ^ use of possibly-uninitialized `x`
20
21 error[E0381]: borrow of possibly-uninitialized variable: `x`
22   --> $DIR/pattern-matching-should-fail.rs:15:14
23    |
24 LL |     let c2 = || match x { _ => () };
25    |              ^^       - borrow occurs due to use in closure
26    |              |
27    |              use of possibly-uninitialized `x`
28
29 error[E0381]: borrow of possibly-uninitialized variable: `variant`
30   --> $DIR/pattern-matching-should-fail.rs:27:13
31    |
32 LL |     let c = || {
33    |             ^^ use of possibly-uninitialized `variant`
34 LL |
35 LL |         match variant {
36    |               ------- borrow occurs due to use in closure
37
38 error[E0381]: borrow of possibly-uninitialized variable: `variant`
39   --> $DIR/pattern-matching-should-fail.rs:39:13
40    |
41 LL |     let c = || {
42    |             ^^ use of possibly-uninitialized `variant`
43 LL |
44 LL |         match variant {
45    |               ------- borrow occurs due to use in closure
46
47 error[E0381]: use of possibly-uninitialized variable: `g`
48   --> $DIR/pattern-matching-should-fail.rs:55:15
49    |
50 LL |         match g { };
51    |               ^ use of possibly-uninitialized `g`
52
53 error[E0381]: use of possibly-uninitialized variable: `t`
54   --> $DIR/pattern-matching-should-fail.rs:58:19
55    |
56 LL |             match t { };
57    |                   ^ use of possibly-uninitialized `t`
58
59 error[E0381]: use of possibly-uninitialized variable: `x`
60   --> $DIR/pattern-matching-should-fail.rs:70:23
61    |
62 LL |     let c1 = || match x { };
63    |                       ^ use of possibly-uninitialized `x`
64
65 error: aborting due to 8 previous errors
66
67 Some errors have detailed explanations: E0004, E0381.
68 For more information about an error, try `rustc --explain E0004`.