2024-02-16 20:02:50 +00:00
|
|
|
//@ edition: 2021
|
2023-10-24 16:51:26 +00:00
|
|
|
|
|
|
|
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() {}
|