1 // Test use of min_const_fn without feature gate.
3 const fn foo() -> usize { 0 } // stabilized
6 const fn foo() -> u32; //~ ERROR functions in traits cannot be declared const
7 const fn bar() -> u32 { 0 } //~ ERROR functions in traits cannot be declared const
11 const fn foo() -> u32 { 0 } //~ ERROR functions in traits cannot be declared const
17 const fn baz() -> u32 { 0 } // stabilized
20 static FOO: usize = foo();
21 const BAR: usize = foo();
23 macro_rules! constant {
24 ($n:ident: $t:ty = $v:expr) => {
34 let x: [usize; foo()] = [];