]> git.proxmox.com Git - rustc.git/blob - src/test/ui/mir_check_nonconst.rs
New upstream version 1.52.1+dfsg1
[rustc.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() {}