aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/arrays_index3.rs
blob: 8fa0a226d027bc35a7d433d5265e9a04f72607c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fn foo() -> usize {
    1
}
    
fn bar() -> [i32; 1] {
    [0]
}
    
    
        
fn main() -> () {
    let a = [10];
    let _b = a[foo()];
    let _c = bar()[foo()];
}