about summary refs log tree commit diff
path: root/tests/ui/indexing/index-bounds.rs
blob: 2b318beeeaa792bfd63568001adac60410fdfa10 (plain)
1
2
3
4
5
6
7
8
9
10
//@ build-fail

fn main() {
    let _n = [64][200];
    //~^ ERROR this operation will panic at runtime [unconditional_panic]

    // issue #121126, test index value between 0xFFFF_FF00 and u32::MAX
    let _n = [64][u32::MAX as usize - 1];
    //~^ ERROR this operation will panic at runtime [unconditional_panic]
}