//@ compile-flags: -Znext-solver //@ check-pass #![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 Foo for u32 { type Assoc = N where T: Bar; } impl const Foo for i32 { type Assoc = C where T: ~const Bar; } fn main() {}