mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
8 lines
223 B
Rust
8 lines
223 B
Rust
fn main() {
|
|
let x = 5;
|
|
const Y: i32 = x; //~ ERROR attempt to use a non-constant value in a constant [E0435]
|
|
|
|
let x = 5;
|
|
let _ = [0; x]; //~ ERROR attempt to use a non-constant value in a constant [E0435]
|
|
}
|