rust/tests/ui/const_prop/const-prop-ice2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
171 B
Rust
Raw Normal View History

// build-fail
2018-11-08 20:18:26 +01:00
fn main() {
enum Enum { One=1 }
let xs=[0;1 as usize];
println!("{}", xs[Enum::One as usize]); //~ ERROR this operation will panic at runtime
2018-11-09 10:11:20 +01:00
}