mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			348 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			348 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| fn main() {
 | |
|     // no complaints about the tuple not matching the expected type
 | |
|     let x: (usize, usize, usize) = (3, .=.);
 | |
|     //~^ ERROR expected expression, found `.`
 | |
|     // verify that the parser recovers:
 | |
|     let y: usize = ""; //~ ERROR mismatched types
 | |
|     // no complaints about the type
 | |
|     foo(x);
 | |
| }
 | |
| 
 | |
| fn foo(_: (usize, usize, usize)) {}
 | 
