]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mir_check_nonconst.rs
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / mir_check_nonconst.rs
1 #![allow(dead_code)]
2
3 struct Foo { a: u8 }
4 fn bar() -> Foo {
5     Foo { a: 5 }
6 }
7
8 static foo: Foo = bar();
9 //~^ ERROR calls in statics are limited to constant functions, tuple structs and tuple variants
10
11 fn main() {}