]>
Commit | Line | Data |
---|---|---|
f035d41b | 1 | error[E0005]: refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered |
0731742a | 2 | --> $DIR/const-pattern-irrefutable.rs:12:9 |
abe05a73 | 3 | | |
e74abb32 | 4 | LL | const a: u8 = 2; |
064997fb | 5 | | ----------- constant defined here |
e74abb32 | 6 | ... |
532ac7d7 | 7 | LL | let a = 4; |
e74abb32 XL |
8 | | ^ |
9 | | | | |
10 | | interpreted as a constant pattern, not a new variable | |
11 | | help: introduce a variable instead: `a_var` | |
ba9703b0 XL |
12 | | |
13 | = note: the matched value is of type `u8` | |
abe05a73 | 14 | |
f035d41b | 15 | error[E0005]: refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered |
0731742a | 16 | --> $DIR/const-pattern-irrefutable.rs:13:9 |
abe05a73 | 17 | | |
e74abb32 | 18 | LL | pub const b: u8 = 2; |
064997fb | 19 | | --------------- constant defined here |
e74abb32 | 20 | ... |
532ac7d7 | 21 | LL | let c = 4; |
e74abb32 XL |
22 | | ^ |
23 | | | | |
24 | | interpreted as a constant pattern, not a new variable | |
25 | | help: introduce a variable instead: `c_var` | |
ba9703b0 XL |
26 | | |
27 | = note: the matched value is of type `u8` | |
abe05a73 | 28 | |
f035d41b | 29 | error[E0005]: refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered |
0731742a | 30 | --> $DIR/const-pattern-irrefutable.rs:14:9 |
abe05a73 | 31 | | |
e74abb32 | 32 | LL | pub const d: u8 = 2; |
064997fb | 33 | | --------------- constant defined here |
e74abb32 | 34 | ... |
532ac7d7 | 35 | LL | let d = 4; |
e74abb32 XL |
36 | | ^ |
37 | | | | |
38 | | interpreted as a constant pattern, not a new variable | |
39 | | help: introduce a variable instead: `d_var` | |
ba9703b0 XL |
40 | | |
41 | = note: the matched value is of type `u8` | |
abe05a73 XL |
42 | |
43 | error: aborting due to 3 previous errors | |
44 | ||
0531ce1d | 45 | For more information about this error, try `rustc --explain E0005`. |