mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			228 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			228 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ run-pass
 | |
| 
 | |
| // Tests for match as expressions resulting in boxed types
 | |
| fn test_box() {
 | |
|     let res: Box<_> = match true { true => { Box::new(100) }, _ => panic!() };
 | |
|     assert_eq!(*res, 100);
 | |
| }
 | |
| 
 | |
| pub fn main() { test_box(); }
 | 
