mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			301 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			301 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // 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(){}
 | 
