]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.stderr
Tweak move error
[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    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
8    = note: the matched value is of type `u8`
9
10 error[E0381]: use of possibly-uninitialized variable: `x`
11   --> $DIR/pattern-matching-should-fail.rs:8:23
12    |
13 LL |     let c1 = || match x { };
14    |                       ^ use of possibly-uninitialized `x`
15
16 error[E0381]: borrow of possibly-uninitialized variable: `x`
17   --> $DIR/pattern-matching-should-fail.rs:15:14
18    |
19 LL |     let c2 = || match x { _ => () };
20    |              ^^       - borrow occurs due to use in closure
21    |              |
22    |              use of possibly-uninitialized `x`
23
24 error[E0381]: borrow of possibly-uninitialized variable: `variant`
25   --> $DIR/pattern-matching-should-fail.rs:27:13
26    |
27 LL |     let c = || {
28    |             ^^ use of possibly-uninitialized `variant`
29 LL |
30 LL |         match variant {
31    |               ------- borrow occurs due to use in closure
32
33 error[E0381]: borrow of possibly-uninitialized variable: `variant`
34   --> $DIR/pattern-matching-should-fail.rs:39:13
35    |
36 LL |     let c = || {
37    |             ^^ use of possibly-uninitialized `variant`
38 LL |
39 LL |         match variant {
40    |               ------- borrow occurs due to use in closure
41
42 error[E0381]: use of possibly-uninitialized variable: `g`
43   --> $DIR/pattern-matching-should-fail.rs:55:15
44    |
45 LL |         match g { };
46    |               ^ use of possibly-uninitialized `g`
47
48 error[E0381]: use of possibly-uninitialized variable: `t`
49   --> $DIR/pattern-matching-should-fail.rs:58:19
50    |
51 LL |             match t { };
52    |                   ^ use of possibly-uninitialized `t`
53
54 error[E0381]: use of possibly-uninitialized variable: `x`
55   --> $DIR/pattern-matching-should-fail.rs:70:23
56    |
57 LL |     let c1 = || match x { };
58    |                       ^ use of possibly-uninitialized `x`
59
60 error: aborting due to 8 previous errors
61
62 Some errors have detailed explanations: E0004, E0381.
63 For more information about an error, try `rustc --explain E0004`.