blob: 9d703cf0df1bc1c8846be2bff367f032f58be40a [file] [log] [blame]
trait Marker {}
impl Marker for u32 {}
trait MyTrait {
fn foo(&self) -> impl Marker
where
Self: Sized;
}
struct Outer;
impl MyTrait for Outer {
fn foo(&self) -> impl Marker {
42
}
}
impl dyn MyTrait {
fn other(&self) -> impl Marker {
MyTrait::foo(&self)
//~^ ERROR the trait bound `&dyn MyTrait: MyTrait` is not satisfied
//~| ERROR the trait bound `&dyn MyTrait: MyTrait` is not satisfied
}
}
fn main() {}