#![feature(const_generics)] #![allow(incomplete_features)] trait Foo { const VAL: usize; } trait MyTrait {} trait True {} struct Is; impl True for Is<{true}> {} impl MyTrait for T where Is<{T::VAL == 5}>: True {} //~^ ERROR constant expression depends on a generic parameter impl MyTrait for T where Is<{T::VAL == 6}>: True {} //~^ ERROR constant expression depends on a generic parameter fn main() {}