rust/src/test/compile-fail/issue-3521-2.rs

8 lines
143 B
Rust
Raw Normal View History

fn main() {
let foo = 100;
const y: int = foo + 1; //~ ERROR: attempt to use a non-constant value in a constant
log(error, y);
}