Sign in
fuchsia
/
third_party
/
rust
/
cad2d5840b1be3163855223b5c784852554ebfe0
/
.
/
src
/
test
/
ui
/
mir_check_nonconst.rs
blob: b8ec0c3c449ff6785be64498a97cbc74d595f56d [
file
] [
log
] [
blame
]
#![
allow
(
dead_code
)]
struct
Foo
{
a
:
u8
}
fn
bar
()
->
Foo
{
Foo
{
a
:
5
}
}
static
foo
:
Foo
=
bar
();
//~^ ERROR calls in statics are limited to constant functions, tuple structs and tuple variants
fn
main
()
{}