add test for nested pattern

This commit is contained in:
b-naber 2023-07-03 20:55:37 +00:00
parent feb8bb1273
commit 843e2ee5d5

View File

@ -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());
}