aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/bad_toplevel_enums.rs
blob: 137095bf00cb1101aff1e798db440616c0d67e17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pub enum E
{
  pub A { a: i32 },
  B (u8),
  pub C,
  B // { dg-error "defined multiple times" }
}

enum E2 { }
struct E2 { } // { dg-error "defined multiple times" }

enum E1
{
  A,
  pub B = 42,
  C = 3,
  A { a: u8 }, // { dg-error "defined multiple times" }
  pub D
}