//@ run-pass //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver trait Id { type This<'a>; } impl Id for T { type This<'a> = T; } trait Trait {} impl Trait fn(T::This<'a>)> for T {} trait Method { fn call_me(&self) where T: Trait fn(T::This<'a>)>; } impl Method for T { fn call_me(&self) { println!("method was reachable"); } } fn generic(x: &dyn Method) { // Proving `T: Trait fn(T::This<'a>)>` holds. x.call_me(); } fn main() { // Proving `u32: Trait` fails due to incompleteness. // We don't add the method to the vtable of `dyn Method`, so // calling it causes UB. generic::(&()); }