// [full] check-pass // revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] pub struct IsLessOrEqual; pub struct Condition; pub trait True {} impl True for IsLessOrEqual where Condition<{ LHS <= RHS }>: True //[min]~^ Error generic parameters may not be used in const operations //[min]~| Error generic parameters may not be used in const operations { } impl True for Condition {} struct S; impl S where IsLessOrEqual: True, //[min]~^ Error type annotations needed //[min]~| Error type annotations needed IsLessOrEqual: True, IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, //[min]~^ Error generic parameters may not be used in const operations //[min]~| Error generic parameters may not be used in const operations // Condition<{ 8 - I <= 8 - J }>: True, { fn print() { println!("I {} J {}", I, J); } } fn main() {}