1 // aux-build:legacy-const-generics.rs
3 extern crate legacy_const_generics;
5 fn foo<const N: usize>() {
7 legacy_const_generics::foo(0, a, 2);
8 //~^ ERROR attempt to use a non-constant value in a constant
10 legacy_const_generics::foo(0, N, 2);
12 legacy_const_generics::foo(0, N + 1, 2);
13 //~^ ERROR generic parameters may not be used in const operations