diff options
Diffstat (limited to 'src/test/ui/mir/mir_codegen_array_2.rs')
-rw-r--r-- | src/test/ui/mir/mir_codegen_array_2.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/mir/mir_codegen_array_2.rs b/src/test/ui/mir/mir_codegen_array_2.rs new file mode 100644 index 000000000..03d3aa5ad --- /dev/null +++ b/src/test/ui/mir/mir_codegen_array_2.rs @@ -0,0 +1,9 @@ +// 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); +} |