]> git.lizzy.rs Git - rust.git/blob - tests/ui/enum/union-in-enum.rs
Rollup merge of #105172 - alexs-sh:issue-98861-fix-next, r=scottmcm
[rust.git] / tests / 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(){}