]> git.proxmox.com Git - rustc.git/blame - src/test/ui/mir_check_nonconst.rs
New upstream version 1.52.1+dfsg1
[rustc.git] / src / test / ui / mir_check_nonconst.rs
CommitLineData
83c7162d 1#![allow(dead_code)]
041b39d2 2
83c7162d
XL
3struct Foo { a: u8 }
4fn bar() -> Foo {
5 Foo { a: 5 }
476ff2be 6}
041b39d2 7
83c7162d
XL
8static foo: Foo = bar();
9//~^ ERROR calls in statics are limited to constant functions, tuple structs and tuple variants
10
11fn main() {}