]>
Commit | Line | Data |
---|---|---|
b039eaaf SL |
1 | // Copyright 2015 The Rust Project Developers. See the COPYRIGHT |
2 | // file at the top-level directory of this distribution and at | |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | ||
11 | // Can't use unit struct as enum pattern | |
12 | ||
13 | #![feature(braced_empty_structs)] | |
14 | ||
15 | FIXME //~ ERROR expected item, found `FIXME` | |
16 | ||
17 | struct Empty1; | |
18 | ||
19 | enum E { | |
20 | Empty2 | |
21 | } | |
22 | ||
23 | fn main() { | |
24 | let e1 = Empty1; | |
25 | let e2 = E::Empty2; | |
26 | ||
27 | // Issue #28692 | |
28 | // match e1 { | |
29 | // Empty1() => () // ERROR variable `Empty1` should have a snake case name | |
30 | // } | |
31 | // match e1 { | |
32 | // Empty1(..) => () // ERROR variable `Empty1` should have a snake case name | |
33 | // } | |
34 | // match e2 { | |
35 | // E::Empty2() => () // ERROR variable `Empty2` should have a snake case name | |
36 | // } | |
37 | // match e2 { | |
38 | // E::Empty2(..) => () // ERROR variable `Empty2` should have a snake case name | |
39 | // } | |
40 | } |