// Regression test for #140571. The compiler used to ICE #![feature(associated_const_equality, specialization)] //~^ WARN the feature `specialization` is incomplete pub trait IsVoid { const IS_VOID: bool; } impl IsVoid for T { default const IS_VOID: bool = false; } pub trait NotVoid {} impl NotVoid for T where T: IsVoid + ?Sized {} pub trait Maybe {} impl Maybe for T {} impl Maybe for () where T: NotVoid + ?Sized {} //~^ ERROR conflicting implementations of trait `Maybe<()>` for type `()` fn main() {}