mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
12 lines
244 B
Rust
12 lines
244 B
Rust
//! 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);
|
|
}
|