2020-06-19 18:57:15 +02: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:12:9
|
2017-11-04 03:01:56 +03:00
|
|
|
|
|
2019-09-28 02:30:48 +02:00
|
|
|
LL | const a: u8 = 2;
|
2022-02-13 16:27:59 +01:00
|
|
|
| ----------- constant defined here
|
2019-09-28 02:30:48 +02:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | let a = 4;
|
2019-09-28 02:30:48 +02:00
|
|
|
| ^
|
|
|
|
| |
|
|
|
|
| interpreted as a constant pattern, not a new variable
|
|
|
|
| help: introduce a variable instead: `a_var`
|
2020-03-27 06:44:30 +01:00
|
|
|
|
|
|
|
|
= note: the matched value is of type `u8`
|
2017-11-04 03:01:56 +03:00
|
|
|
|
2020-06-19 18:57:15 +02: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
|
|
|
|
|
2019-09-28 02:30:48 +02:00
|
|
|
LL | pub const b: u8 = 2;
|
2022-02-13 16:27:59 +01:00
|
|
|
| --------------- constant defined here
|
2019-09-28 02:30:48 +02:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | let c = 4;
|
2019-09-28 02:30:48 +02:00
|
|
|
| ^
|
|
|
|
| |
|
|
|
|
| interpreted as a constant pattern, not a new variable
|
|
|
|
| help: introduce a variable instead: `c_var`
|
2020-03-27 06:44:30 +01:00
|
|
|
|
|
|
|
|
= note: the matched value is of type `u8`
|
2017-11-04 03:01:56 +03:00
|
|
|
|
2020-06-19 18:57:15 +02: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
|
|
|
|
|
2019-09-28 02:30:48 +02:00
|
|
|
LL | pub const d: u8 = 2;
|
2022-02-13 16:27:59 +01:00
|
|
|
| --------------- constant defined here
|
2019-09-28 02:30:48 +02:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | let d = 4;
|
2019-09-28 02:30:48 +02:00
|
|
|
| ^
|
|
|
|
| |
|
|
|
|
| interpreted as a constant pattern, not a new variable
|
|
|
|
| help: introduce a variable instead: `d_var`
|
2020-03-27 06:44:30 +01:00
|
|
|
|
|
|
|
|
= 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`.
|