]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0530]: match bindings cannot shadow unit variants |
dfeec247 | 2 | --> $DIR/issue-27033.rs:7:9 |
8faf50e0 | 3 | | |
532ac7d7 | 4 | LL | None @ _ => {} |
8faf50e0 | 5 | | ^^^^ cannot be named the same as a unit variant |
e74abb32 XL |
6 | | |
7 | ::: $SRC_DIR/libstd/prelude/v1.rs:LL:COL | |
8 | | | |
60c5eb7d XL |
9 | LL | pub use crate::option::Option::{self, None, Some}; |
10 | | ---- the unit variant `None` is defined here | |
8faf50e0 XL |
11 | |
12 | error[E0530]: match bindings cannot shadow constants | |
dfeec247 | 13 | --> $DIR/issue-27033.rs:11:9 |
8faf50e0 XL |
14 | | |
15 | LL | const C: u8 = 1; | |
13cf67c4 | 16 | | ---------------- the constant `C` is defined here |
8faf50e0 | 17 | LL | match 1 { |
532ac7d7 | 18 | LL | C @ 2 => { |
8faf50e0 XL |
19 | | ^ cannot be named the same as a constant |
20 | ||
21 | error: aborting due to 2 previous errors | |
22 | ||
23 | For more information about this error, try `rustc --explain E0530`. |