2018-07-15 16:11:54 -05:00
|
|
|
error[E0530]: match bindings cannot shadow unit variants
|
2020-03-31 20:10:13 -05:00
|
|
|
--> $DIR/issue-27033.rs:3:9
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | None @ _ => {}
|
2018-07-15 16:11:54 -05:00
|
|
|
| ^^^^ cannot be named the same as a unit variant
|
2019-10-14 19:20:50 -05:00
|
|
|
|
|
|
|
|
::: $SRC_DIR/libstd/prelude/v1.rs:LL:COL
|
|
|
|
|
|
2019-11-27 13:07:26 -06:00
|
|
|
LL | pub use crate::option::Option::{self, None, Some};
|
|
|
|
| ---- the unit variant `None` is defined here
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
error[E0530]: match bindings cannot shadow constants
|
2020-03-31 20:10:13 -05:00
|
|
|
--> $DIR/issue-27033.rs:7:9
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
|
LL | const C: u8 = 1;
|
2018-11-11 10:46:04 -06:00
|
|
|
| ---------------- the constant `C` is defined here
|
2018-07-15 16:11:54 -05:00
|
|
|
LL | match 1 {
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | C @ 2 => {
|
2018-07-15 16:11:54 -05: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`.
|