1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
//@ compile-flags: -Znext-solver
trait Trait<'a> {
type Assoc;
}
fn foo(x: for<'a> fn(<() as Trait<'a>>::Assoc)) {
//~^ ERROR the trait bound `for<'a> (): Trait<'a>` is not satisfied
//~| ERROR the trait bound `for<'a> (): Trait<'a>` is not satisfied
//~| ERROR the trait bound `for<'a> (): Trait<'a>` is not satisfied
unsafe { std::mem::transmute::<_, ()>(x); }
//~^ ERROR the trait bound `for<'a> (): Trait<'a>` is not satisfied
//~| ERROR the trait bound `for<'a> (): Trait<'a>` is not satisfied
//~| ERROR the trait bound `for<'a> (): Trait<'a>` is not satisfied
}
fn main() {}
|