]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-pattern-irrefutable.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / consts / const-pattern-irrefutable.stderr
CommitLineData
f035d41b 1error[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 4LL | const a: u8 = 2;
064997fb 5 | ----------- constant defined here
e74abb32 6...
532ac7d7 7LL | 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 15error[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 18LL | pub const b: u8 = 2;
064997fb 19 | --------------- constant defined here
e74abb32 20...
532ac7d7 21LL | 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 29error[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 32LL | pub const d: u8 = 2;
064997fb 33 | --------------- constant defined here
e74abb32 34...
532ac7d7 35LL | 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
43error: aborting due to 3 previous errors
44
0531ce1d 45For more information about this error, try `rustc --explain E0005`.