mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			158 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			158 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| enum Foo {
 | |
|     // test that we detect overflows for non-u32 discriminants
 | |
|     X = 1 << ((u32::MAX as u64) + 1), //~ ERROR E0080
 | |
|     Y = 42,
 | |
| }
 | |
| 
 | |
| 
 | |
| fn main() {
 | |
| }
 | 
