1 struct Foo1<const N1: usize>;
2 struct Foo2<const N1: usize, const N2: usize>;
3 struct Foo3<const N1: usize, const N2: usize, const N3: usize>;
5 impl<const N1: usize> Foo1<N1> {
9 impl<const N1: usize, const N2: usize> Foo2<N1, N2> {
10 const SUM: usize = N1 + N2;
13 impl<const N1: usize, const N2: usize, const N3: usize> Foo3<N1, N2, N3> {
14 const SUM: usize = N1 + N2 + N3;
17 fn foo1() -> [(); Foo1<10>::SUM] { //~ ERROR: comparison operators cannot be chained
21 fn foo2() -> [(); Foo2<10, 20>::SUM] {
22 //~^ ERROR: expected one of `.`, `?`, `]`, or an operator, found `,`
26 fn foo3() -> [(); Foo3<10, 20, 30>::SUM] {
27 //~^ ERROR: expected one of `.`, `?`, `]`, or an operator, found `,`