1 2 3 4 5 6 7 8 9 10 11
#![allow(dead_code)] struct Foo { a: u8 } fn bar() -> Foo { Foo { a: 5 } } static foo: Foo = bar(); //~^ ERROR cannot call non-const fn fn main() {}