1
Fork 0
rust/src/test/ui/issues/issue-27033.stderr

24 lines
762 B
Text
Raw Normal View History

2018-07-15 14:11:54 -07:00
error[E0530]: match bindings cannot shadow unit variants
--> $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
|
::: $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
--> $DIR/issue-27033.rs:11:9
2018-07-15 14:11:54 -07:00
|
LL | const C: u8 = 1;
| ---------------- 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`.