2022-12-23 14:02:23 -06:00
|
|
|
error[E0005]: refutable pattern in local binding
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const-pattern-irrefutable.rs:12:9
|
2017-11-03 19:01:56 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let a = 4;
|
2023-02-27 14:50:01 -06:00
|
|
|
| ^
|
|
|
|
| |
|
|
|
|
| patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered
|
|
|
|
| missing patterns are not covered because `a` is interpreted as a constant pattern, not a new variable
|
|
|
|
| help: introduce a variable instead: `a_var`
|
2020-03-27 00:44:30 -05:00
|
|
|
|
|
2023-02-27 11:43:39 -06:00
|
|
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
|
|
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
2020-03-27 00:44:30 -05:00
|
|
|
= note: the matched value is of type `u8`
|
2017-11-03 19:01:56 -05:00
|
|
|
|
2022-12-23 14:02:23 -06:00
|
|
|
error[E0005]: refutable pattern in local binding
|
2023-02-27 14:50:01 -06:00
|
|
|
--> $DIR/const-pattern-irrefutable.rs:17:9
|
2017-11-03 19:01:56 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let c = 4;
|
2023-02-27 14:50:01 -06:00
|
|
|
| ^
|
|
|
|
| |
|
|
|
|
| patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered
|
|
|
|
| missing patterns are not covered because `c` is interpreted as a constant pattern, not a new variable
|
|
|
|
| help: introduce a variable instead: `c_var`
|
2020-03-27 00:44:30 -05:00
|
|
|
|
|
2023-02-27 11:43:39 -06:00
|
|
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
|
|
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
2020-03-27 00:44:30 -05:00
|
|
|
= note: the matched value is of type `u8`
|
2017-11-03 19:01:56 -05:00
|
|
|
|
2022-12-23 14:02:23 -06:00
|
|
|
error[E0005]: refutable pattern in local binding
|
2023-02-27 14:50:01 -06:00
|
|
|
--> $DIR/const-pattern-irrefutable.rs:22:9
|
2017-11-03 19:01:56 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let d = 4;
|
2023-02-27 14:50:01 -06:00
|
|
|
| ^
|
|
|
|
| |
|
|
|
|
| patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered
|
|
|
|
| missing patterns are not covered because `d` is interpreted as a constant pattern, not a new variable
|
|
|
|
| help: introduce a variable instead: `d_var`
|
2020-03-27 00:44:30 -05:00
|
|
|
|
|
2023-02-27 11:43:39 -06:00
|
|
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
|
|
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
2020-03-27 00:44:30 -05:00
|
|
|
= note: the matched value is of type `u8`
|
2017-11-03 19:01:56 -05:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0005`.
|