| // Test use of advanced const fn without the `const_fn` feature gate. |
| const fn foo() -> usize { 0 } // ok |
| const fn foo() -> u32; //~ ERROR const fn is unstable |
| //~| ERROR functions in traits cannot be declared const |
| const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable |
| //~| ERROR functions in traits cannot be declared const |
| const fn foo() -> u32 { 0 } //~ ERROR functions in traits cannot be declared const |
| const fn baz() -> u32 { 0 } // ok |
| static FOO: usize = foo(); |
| const BAR: usize = foo(); |
| ($n:ident: $t:ty = $v:expr) => { |
| let x: [usize; foo()] = []; |