mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 21:16:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			250 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			250 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ run-pass
 | |
| pub fn main() {
 | |
|     let foo = (Some(1), (), (), vec![2, 3]);
 | |
| 
 | |
|     match &foo {
 | |
|         (Some(n), .., v) => {
 | |
|             assert_eq!((*v).len(), 2);
 | |
|             assert_eq!(*n, 1);
 | |
|         }
 | |
|         (None, (), (), ..) => panic!(),
 | |
|     }
 | |
| }
 | 
