about summary refs log tree commit diff
path: root/tests/ui/array-slice-vec/repeated-vector-syntax.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/array-slice-vec/repeated-vector-syntax.rs')
-rw-r--r--tests/ui/array-slice-vec/repeated-vector-syntax.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/array-slice-vec/repeated-vector-syntax.rs b/tests/ui/array-slice-vec/repeated-vector-syntax.rs
new file mode 100644
index 00000000000..4458eb06dd5
--- /dev/null
+++ b/tests/ui/array-slice-vec/repeated-vector-syntax.rs
@@ -0,0 +1,13 @@
+// run-pass
+
+pub fn main() {
+    let x = [ [true]; 512 ];
+    let y = [ 0; 1 ];
+
+    print!("[");
+    for xi in &x[..] {
+        print!("{:?}, ", &xi[..]);
+    }
+    println!("]");
+    println!("{:?}", &y[..]);
+}