summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/slice-patterns-nested.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pattern/slice-patterns-nested.rs')
-rw-r--r--tests/ui/pattern/slice-patterns-nested.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/pattern/slice-patterns-nested.rs b/tests/ui/pattern/slice-patterns-nested.rs
new file mode 100644
index 000000000..077e0a139
--- /dev/null
+++ b/tests/ui/pattern/slice-patterns-nested.rs
@@ -0,0 +1,15 @@
+// check-pass
+#![allow(unused_variables)]
+
+struct Zeroes;
+struct Foo<T>(T);
+
+impl Into<[usize; 3]> for Zeroes {
+ fn into(self) -> [usize; 3] {
+ [0; 3]
+ }
+}
+
+fn main() {
+ let Foo([a, b, c]) = Foo(Zeroes.into());
+}