Sign in
fuchsia
/
third_party
/
rust
/
HEAD
/
.
/
tests
/
ui
/
statics
/
static-cannot-use-local-variable.rs
blob: 0269f9e6e89641817b4b4bdd791ed40f81817081 [
file
] [
log
] [
blame
]
//! Regression test for https://github.com/rust-lang/rust/issues/3521
//!
//@ run-rustfix
fn
main
()
{
let
foo
=
100
;
static
y
:
isize
=
foo
+
1
;
//~^ ERROR attempt to use a non-constant value in a constant
println
!(
"{}"
,
y
);
}