mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			240 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			240 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
// Regression test of #86162.
 | 
						|
 | 
						|
fn gen<T>() -> T { todo!() }
 | 
						|
 | 
						|
struct Foo;
 | 
						|
 | 
						|
impl Foo {
 | 
						|
    fn bar(x: impl Clone) {}
 | 
						|
}
 | 
						|
 | 
						|
fn main() {
 | 
						|
    Foo::bar(gen()); //<- Do not suggest `Foo::bar::<impl Clone>()`!
 | 
						|
    //~^ ERROR: type annotations needed
 | 
						|
}
 |