rust/tests/ui/consts/issue-54348.rs

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

8 lines
163 B
Rust
Raw Normal View History

//@ build-fail
2018-11-14 17:54:32 +00:00
fn main() {
[1][0u64 as usize];
2020-02-15 12:15:15 +00:00
[1][1.5 as usize]; //~ ERROR operation will panic
[1][1u64 as usize]; //~ ERROR operation will panic
2018-11-14 17:54:32 +00:00
}