mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-29 20:15:27 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			9 lines
		
	
	
		
			281 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
		
			281 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| fn main() {
 | |
|     let (mut a, mut b);
 | |
|     [a, .., b, ..] = [0, 1]; //~ ERROR `..` can only be used once per slice pattern
 | |
|     [a, a, b] = [1, 2];
 | |
|     //~^ ERROR pattern requires 3 elements but array has 2
 | |
|     [_] = [1, 2];
 | |
|     //~^ ERROR pattern requires 1 element but array has 2
 | |
| }
 | 
