summaryrefslogtreecommitdiffstats
path: root/tests/ui/mir/mir_codegen_array.rs
blob: 38e443d8e39f38fefaf6c33b0bf482d068e15572 (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-pass
#![allow(unused_mut)]
fn into_inner() -> [u64; 1024] {
    let mut x = 10 + 20;
    [x; 1024]
}

fn main(){
    let x: &[u64] = &[30; 1024];
    assert_eq!(&into_inner()[..], x);
}