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
162 B
Rust
Raw Normal View History

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