]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-pattern-irrefutable.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.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` not covered
13     let c = 4; //~ ERROR refutable pattern in local binding: `0u8..=1u8` not covered
14     let d = 4; //~ ERROR refutable pattern in local binding: `0u8..=1u8` not covered
15     fn f() {} // Check that the `NOTE`s still work with an item here (cf. issue #35115).
16 }