]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-pattern-irrefutable.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / consts / const-pattern-irrefutable.rs
CommitLineData
92a42be0 1mod foo {
a7813a04
XL
2 pub const b: u8 = 2;
3 pub const d: u8 = 2;
92a42be0
SL
4}
5
abe05a73
XL
6use foo::b as c;
7use foo::d;
92a42be0 8
abe05a73 9const a: u8 = 2;
92a42be0
SL
10
11fn main() {
f035d41b
XL
12 let a = 4; //~ ERROR refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::MAX
13 let c = 4; //~ ERROR refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::MAX
14 let d = 4; //~ ERROR refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::MAX
0731742a 15 fn f() {} // Check that the `NOTE`s still work with an item here (cf. issue #35115).
92a42be0 16}