#![feature(const_generics)] #![allow(incomplete_features)] pub struct IsLessOrEqual; pub struct Condition; pub trait True {} impl True for IsLessOrEqual where Condition<{ LHS <= RHS }>: True //~^ Error constant expression depends on a generic parameter { } impl True for Condition {} struct S; impl S where IsLessOrEqual: True, IsLessOrEqual: True, IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, //~^ Error constant expression depends on a generic parameter //~| Error constant expression depends on a generic parameter //~| Error constant expression depends on a generic parameter //~| Error constant expression depends on a generic parameter // Condition<{ 8 - I <= 8 - J }>: True, { fn print() { println!("I {} J {}", I, J); } } fn main() {}