2025-04-18 23:36:17 +00:00
|
|
|
trait Foo {
|
|
|
|
|
type Assoc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
trait Bar {
|
|
|
|
|
fn method() -> impl Sized;
|
|
|
|
|
//~^ ERROR the trait bound `T: Foo` is not satisfied
|
|
|
|
|
}
|
|
|
|
|
impl<T> Bar for T
|
|
|
|
|
//~^ ERROR the trait bound `T: Foo` is not satisfied
|
|
|
|
|
where
|
|
|
|
|
<T as Foo>::Assoc: Sized,
|
2025-06-04 11:32:29 +00:00
|
|
|
//~^ ERROR the trait bound `T: Foo` is not satisfied
|
|
|
|
|
//~| ERROR the trait bound `T: Foo` is not satisfied
|
2025-04-18 23:36:17 +00:00
|
|
|
{
|
|
|
|
|
fn method() {}
|
|
|
|
|
//~^ ERROR the trait bound `T: Foo` is not satisfied
|
|
|
|
|
//~| ERROR the trait bound `T: Foo` is not satisfied
|
|
|
|
|
//~| ERROR the trait bound `T: Foo` is not satisfied
|
|
|
|
|
//~| ERROR the trait bound `T: Foo` is not satisfied
|
|
|
|
|
//~| ERROR the trait bound `T: Foo` is not satisfied
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|