rust/tests/ui/consts/const-pattern-irrefutable.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.4 KiB
Text
Raw Normal View History

error[E0005]: refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered
2018-12-25 08:56:47 -07:00
--> $DIR/const-pattern-irrefutable.rs:12:9
2017-11-04 03:01:56 +03:00
|
LL | const a: u8 = 2;
2022-02-13 16:27:59 +01:00
| ----------- constant defined here
...
2019-03-09 15:03:44 +03:00
LL | let a = 4;
| ^
| |
| interpreted as a constant pattern, not a new variable
| help: introduce a variable instead: `a_var`
|
= note: the matched value is of type `u8`
2017-11-04 03:01:56 +03:00
error[E0005]: refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered
2018-12-25 08:56:47 -07:00
--> $DIR/const-pattern-irrefutable.rs:13:9
2017-11-04 03:01:56 +03:00
|
LL | pub const b: u8 = 2;
2022-02-13 16:27:59 +01:00
| --------------- constant defined here
...
2019-03-09 15:03:44 +03:00
LL | let c = 4;
| ^
| |
| interpreted as a constant pattern, not a new variable
| help: introduce a variable instead: `c_var`
|
= note: the matched value is of type `u8`
2017-11-04 03:01:56 +03:00
error[E0005]: refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered
2018-12-25 08:56:47 -07:00
--> $DIR/const-pattern-irrefutable.rs:14:9
2017-11-04 03:01:56 +03:00
|
LL | pub const d: u8 = 2;
2022-02-13 16:27:59 +01:00
| --------------- constant defined here
...
2019-03-09 15:03:44 +03:00
LL | let d = 4;
| ^
| |
| interpreted as a constant pattern, not a new variable
| help: introduce a variable instead: `d_var`
|
= note: the matched value is of type `u8`
2017-11-04 03:01:56 +03:00
error: aborting due to 3 previous errors
2018-03-03 15:59:40 +01:00
For more information about this error, try `rustc --explain E0005`.