]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-pattern-irrefutable.stderr
Rollup merge of #64603 - gilescope:unused-lifetime-warning, r=matthewjasper
[rust.git] / src / test / ui / consts / const-pattern-irrefutable.stderr
1 error[E0005]: refutable pattern in local binding: `0u8..=1u8` and `3u8..=std::u8::MAX` not covered
2   --> $DIR/const-pattern-irrefutable.rs:12:9
3    |
4 LL | const a: u8 = 2;
5    | ---------------- constant defined here
6 ...
7 LL |     let a = 4;
8    |         ^
9    |         |
10    |         interpreted as a constant pattern, not a new variable
11    |         help: introduce a variable instead: `a_var`
12
13 error[E0005]: refutable pattern in local binding: `0u8..=1u8` and `3u8..=std::u8::MAX` not covered
14   --> $DIR/const-pattern-irrefutable.rs:13:9
15    |
16 LL |     pub const b: u8 = 2;
17    |     -------------------- constant defined here
18 ...
19 LL |     let c = 4;
20    |         ^
21    |         |
22    |         interpreted as a constant pattern, not a new variable
23    |         help: introduce a variable instead: `c_var`
24
25 error[E0005]: refutable pattern in local binding: `0u8..=1u8` and `3u8..=std::u8::MAX` not covered
26   --> $DIR/const-pattern-irrefutable.rs:14:9
27    |
28 LL |     pub const d: u8 = 2;
29    |     -------------------- constant defined here
30 ...
31 LL |     let d = 4;
32    |         ^
33    |         |
34    |         interpreted as a constant pattern, not a new variable
35    |         help: introduce a variable instead: `d_var`
36
37 error: aborting due to 3 previous errors
38
39 For more information about this error, try `rustc --explain E0005`.