mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			316 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			316 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ edition: 2021
 | |
| 
 | |
| trait Foo {
 | |
|     type T;
 | |
| 
 | |
|     async fn foo(&self) -> Self::T;
 | |
| }
 | |
| 
 | |
| struct Bar;
 | |
| 
 | |
| impl Foo for Bar {
 | |
|     type T = ();
 | |
| 
 | |
|     async fn foo(&self) {}
 | |
| }
 | |
| 
 | |
| impl Foo for Bar {
 | |
|     //~^ ERROR conflicting implementations of trait `Foo` for type `Bar`
 | |
|     type T = ();
 | |
| 
 | |
|     async fn foo(&self) {}
 | |
| }
 | |
| 
 | |
| fn main() {}
 | 
