rust/tests/ui/mir/mir_codegen_array_2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
158 B
Rust
Raw Normal View History

// run-pass
fn into_inner(x: u64) -> [u64; 1024] {
[x; 2*4*8*16]
}
fn main(){
let x: &[u64] = &[42; 1024];
assert_eq!(&into_inner(42)[..], x);
}