mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			11 lines
		
	
	
		
			259 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			259 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| fn foo(s: &str, a: (i32, i32), s2: &str) {}
 | |
| 
 | |
| fn bar(s: &str, a: (&str,), s2: &str) {}
 | |
| 
 | |
| fn main() {
 | |
|     foo("hi", 1, 2, "hi");
 | |
|     //~^ ERROR function takes 3 arguments but 4 arguments were supplied
 | |
|     bar("hi", "hi", "hi");
 | |
|     //~^ ERROR mismatched types
 | |
| }
 | 
