mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			326 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			326 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // run-pass
 | |
| 
 | |
| #![allow(unused_must_use)]
 | |
| 
 | |
| pub fn main() {
 | |
|     // Test that lambdas behave as unary expressions with block-like expressions
 | |
|     -if true { 1 } else { 2 } * 3;
 | |
|     || if true { 1 } else { 2 } * 3;
 | |
| 
 | |
|     // The following is invalid and parses as `if true { 1 } else { 2 }; *3`
 | |
|     // if true { 1 } else { 2 } * 3
 | |
| }
 | 
