]> git.lizzy.rs Git - rust.git/blob - src/test/ui/enum/union-in-enum.rs
Rollup merge of #106008 - uweigand:s390x-lintgroup-order, r=Nilstrieb
[rust.git] / src / test / ui / enum / union-in-enum.rs
1 // This test checks that the union keyword
2 // is accepted as the name of an enum variant
3 // when not followed by an identifier
4 // This special case exists because `union` is a contextual keyword.
5
6 #![allow(warnings)]
7
8 // check-pass
9
10 enum A { union }
11 enum B { union {} }
12 enum C { union() }
13 fn main(){}