mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	 796b4d1fb4
			
		
	
	
		796b4d1fb4
		
			
		
	
	
	
	
		
			
			When a trait bound fails due to the Self type parameter, adjust_fulfillment_errors now correctly points to the corresponding function argument instead of incorrectly pointing to other arguments. Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
		
			
				
	
	
		
			11 lines
		
	
	
		
			242 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			242 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // In this test, the span of the trait bound label should point to `1`, not `""`.
 | |
| // See issue #143336
 | |
| 
 | |
| trait A<T> {
 | |
|     fn f(self, x: T);
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     A::f(1, ""); //~ ERROR the trait bound `{integer}: A<_>` is not satisfied [E0277]
 | |
| }
 |