// Regression test for #143481, where we were calling `predicates_of` on // a Crate HIR node because we were using a dummy obligation cause's body id // without checking that it was meaningful first. trait Role { type Inner; } struct HandshakeCallback(C); impl Role for HandshakeCallback { //~^ ERROR missing generics type Inner = usize; } struct Handshake(R::Inner); fn accept() -> Handshake> { todo!() } fn main() {}