mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			240 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			240 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| fn test(t: (i32, i32)) {}
 | |
| 
 | |
| struct Foo;
 | |
| 
 | |
| impl Foo {
 | |
|     fn qux(&self) -> i32 {
 | |
|         0
 | |
|     }
 | |
| }
 | |
| 
 | |
| fn bar() {
 | |
|     let x = Foo;
 | |
|     test(x.qux(), x.qux());
 | |
|     //~^ ERROR function takes 1 argument but 2 arguments were supplied
 | |
| }
 | |
| 
 | |
| fn main() {}
 | 
