summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/slice-patterns-nested.rs
blob: 077e0a139544b1bd093f472bd7d10c7f77a32f98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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());
}