]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-pattern-irrefutable.stderr
Do not suggest `let_else` if no bindings would be introduced
[rust.git] / src / test / ui / consts / const-pattern-irrefutable.stderr
1 error[E0005]: refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=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    = note: the matched value is of type `u8`
14
15 error[E0005]: refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered
16   --> $DIR/const-pattern-irrefutable.rs:13:9
17    |
18 LL |     pub const b: u8 = 2;
19    |     -------------------- constant defined here
20 ...
21 LL |     let c = 4;
22    |         ^
23    |         |
24    |         interpreted as a constant pattern, not a new variable
25    |         help: introduce a variable instead: `c_var`
26    |
27    = note: the matched value is of type `u8`
28
29 error[E0005]: refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered
30   --> $DIR/const-pattern-irrefutable.rs:14:9
31    |
32 LL |     pub const d: u8 = 2;
33    |     -------------------- constant defined here
34 ...
35 LL |     let d = 4;
36    |         ^
37    |         |
38    |         interpreted as a constant pattern, not a new variable
39    |         help: introduce a variable instead: `d_var`
40    |
41    = note: the matched value is of type `u8`
42
43 error: aborting due to 3 previous errors
44
45 For more information about this error, try `rustc --explain E0005`.