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