summaryrefslogtreecommitdiffstats
path: root/src/test/ui/enum/union-in-enum.rs
blob: 048913e25cd96b9205de9bd1a72a1c55f96ad30f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// This test checks that the union keyword
// is accepted as the name of an enum variant
// when not followed by an identifier
// This special case exists because `union` is a contextual keyword.

#![allow(warnings)]

// check-pass

enum A { union }
enum B { union {} }
enum C { union() }
fn main(){}