//@ compile-flags: -Znext-solver #![feature(const_trait_impl)] #[const_trait] trait Foo { type Assoc: ~const Bar where T: ~const Bar; } #[const_trait] trait Bar {} struct N(T); impl Bar for N where T: Bar {} struct C(T); impl const Bar for C where T: ~const Bar {} impl const Foo for u32 { type Assoc = N //~^ ERROR the trait bound `N: ~const Bar` is not satisfied where T: ~const Bar; } impl const Foo for i32 { type Assoc = C //~^ ERROR the trait bound `T: ~const Bar` is not satisfied where T: Bar; } fn main() {}