mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 12:36:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			241 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			241 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| use std::fmt::Debug;
 | |
| 
 | |
| trait Foo {
 | |
|     fn foo<A: Debug>(&self, a: &A, b: &impl Debug);
 | |
| }
 | |
| 
 | |
| impl Foo for () {
 | |
|     fn foo<B: Debug>(&self, a: &impl Debug, b: &B) { }
 | |
|     //~^ ERROR method `foo` has an incompatible type for trait
 | |
| }
 | |
| 
 | |
| fn main() {}
 | 
