2018-07-15 14:11:54 -07:00
|
|
|
error[E0530]: match bindings cannot shadow unit variants
|
2019-12-15 12:08:06 -08:00
|
|
|
--> $DIR/issue-27033.rs:7:9
|
2018-07-15 14:11:54 -07:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | None @ _ => {}
|
2018-07-15 14:11:54 -07:00
|
|
|
| ^^^^ cannot be named the same as a unit variant
|
2019-10-14 17:20:50 -07:00
|
|
|
|
|
|
|
|
::: $SRC_DIR/libstd/prelude/v1.rs:LL:COL
|
|
|
|
|
|
2019-11-27 11:07:26 -08:00
|
|
|
LL | pub use crate::option::Option::{self, None, Some};
|
|
|
|
| ---- the unit variant `None` is defined here
|
2018-07-15 14:11:54 -07:00
|
|
|
|
|
|
|
error[E0530]: match bindings cannot shadow constants
|
2019-12-15 12:08:06 -08:00
|
|
|
--> $DIR/issue-27033.rs:11:9
|
2018-07-15 14:11:54 -07:00
|
|
|
|
|
|
|
|
LL | const C: u8 = 1;
|
2018-11-11 19:46:04 +03:00
|
|
|
| ---------------- the constant `C` is defined here
|
2018-07-15 14:11:54 -07:00
|
|
|
LL | match 1 {
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | C @ 2 => {
|
2018-07-15 14:11:54 -07:00
|
|
|
| ^ cannot be named the same as a constant
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0530`.
|