2019-12-06 10:52:28 +05:30
|
|
|
// 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)]
|
|
|
|
|
2024-02-16 20:02:50 +00:00
|
|
|
//@ check-pass
|
2019-12-06 10:52:28 +05:30
|
|
|
|
|
|
|
enum A { union }
|
|
|
|
enum B { union {} }
|
|
|
|
enum C { union() }
|
|
|
|
fn main(){}
|