aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/usize1.rs
blob: 08f6c9cf5cb4e45c6a65d70891081f3b03cc5df9 (plain)
1
2
3
4
5
fn main() {
    let a = [1, 2, 3];
    let b: u32 = 1;
    let c = a[b]; // { dg-error "the type ...integer.; 3.. cannot be indexed by .u32." }
}