forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpattern-matching-should-fail.stderr
63 lines (54 loc) · 2.16 KB
/
pattern-matching-should-fail.stderr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
error[E0004]: non-exhaustive patterns: type `u8` is non-empty
--> $DIR/pattern-matching-should-fail.rs:70:23
|
LL | let c1 = || match x { };
| ^
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type `u8`
error[E0381]: use of possibly-uninitialized variable: `x`
--> $DIR/pattern-matching-should-fail.rs:8:23
|
LL | let c1 = || match x { };
| ^ use of possibly-uninitialized `x`
error[E0381]: borrow of possibly-uninitialized variable: `x`
--> $DIR/pattern-matching-should-fail.rs:15:14
|
LL | let c2 = || match x { _ => () };
| ^^ - borrow occurs due to use in closure
| |
| use of possibly-uninitialized `x`
error[E0381]: borrow of possibly-uninitialized variable: `variant`
--> $DIR/pattern-matching-should-fail.rs:27:13
|
LL | let c = || {
| ^^ use of possibly-uninitialized `variant`
LL |
LL | match variant {
| ------- borrow occurs due to use in closure
error[E0381]: borrow of possibly-uninitialized variable: `variant`
--> $DIR/pattern-matching-should-fail.rs:39:13
|
LL | let c = || {
| ^^ use of possibly-uninitialized `variant`
LL |
LL | match variant {
| ------- borrow occurs due to use in closure
error[E0381]: use of possibly-uninitialized variable: `g`
--> $DIR/pattern-matching-should-fail.rs:55:15
|
LL | match g { };
| ^ use of possibly-uninitialized `g`
error[E0381]: use of possibly-uninitialized variable: `t`
--> $DIR/pattern-matching-should-fail.rs:58:19
|
LL | match t { };
| ^ use of possibly-uninitialized `t`
error[E0381]: use of possibly-uninitialized variable: `x`
--> $DIR/pattern-matching-should-fail.rs:70:23
|
LL | let c1 = || match x { };
| ^ use of possibly-uninitialized `x`
error: aborting due to 8 previous errors
Some errors have detailed explanations: E0004, E0381.
For more information about an error, try `rustc --explain E0004`.