// Regression test for #111935 that non-defining uses of RPIT result in errors #![allow(unconditional_recursion)] fn foo() -> impl Sized { let _: () = foo::(); //~ ERROR expected generic type parameter, found `u8` } fn bar(val: T) -> impl Sized { let _: u8 = bar(0u8); //~^ ERROR concrete type differs from previous defining opaque type use //~| ERROR expected generic type parameter, found `u8` val } fn main() {}