mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			231 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			231 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ run-pass
 | |
| struct Foo(isize, isize);
 | |
| 
 | |
| pub fn main() {
 | |
|     let x = Foo(1, 2);
 | |
|     match x {
 | |
|         Foo(a, b) => {
 | |
|             assert_eq!(a, 1);
 | |
|             assert_eq!(b, 2);
 | |
|             println!("{} {}", a, b);
 | |
|         }
 | |
|     }
 | |
| }
 | 
