// Regresison test for issue #75361 // Tests that we don't ICE on mismatched types with inference variables trait MyTrait { type Item; } pub trait Graph { type EdgeType; fn adjacent_edges(&self) -> Box>; } impl Graph for T { type EdgeType = T; fn adjacent_edges(&self) -> Box + '_> { //~ ERROR `impl` panic!() } } fn main() {}