mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			288 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			288 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ check-pass
 | |
| 
 | |
| fn main() {
 | |
|     let x = 1 else { return }; //~ WARN irrefutable `let...else` pattern
 | |
| 
 | |
|     // Multiline else blocks should not get printed
 | |
|     let x = 1 else { //~ WARN irrefutable `let...else` pattern
 | |
|         eprintln!("problem case encountered");
 | |
|         return
 | |
|     };
 | |
| }
 | 
