summaryrefslogtreecommitdiffstats
path: root/src/test/ui/array-slice-vec/nested-vec-1.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/array-slice-vec/nested-vec-1.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/array-slice-vec/nested-vec-1.rs b/src/test/ui/array-slice-vec/nested-vec-1.rs
new file mode 100644
index 000000000..02a3ccf46
--- /dev/null
+++ b/src/test/ui/array-slice-vec/nested-vec-1.rs
@@ -0,0 +1,8 @@
+// run-pass
+
+// Test that using the `vec!` macro nested within itself works
+
+fn main() {
+ let nested = vec![vec![1u32, 2u32, 3u32]];
+ assert_eq!(nested[0][1], 2);
+}