rust/tests/ui/consts/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 13:18:26 -06: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 03:11:20 -06:00
}