mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 21:16:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			289 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			289 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| #![allow(unused_variables)]
 | |
| #![allow(unused_assignments)]
 | |
| #![allow(dead_code)]
 | |
| #![deny(unreachable_code)]
 | |
| #![feature(never_type, type_ascription)]
 | |
| 
 | |
| fn a() {
 | |
|     // the cast is unreachable:
 | |
|     let x = {return} as !; //~ ERROR unreachable
 | |
|     //~| ERROR non-primitive cast
 | |
| }
 | |
| 
 | |
| fn main() { }
 | 
