summaryrefslogtreecommitdiffstats
path: root/tests/ui/array-slice-vec/infer_array_len.rs
blob: 547c1f5727f192c1e0d2780fc8cef29acbf0b133 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// check-pass
struct A;

impl From<A> for [u8; 2] {
    fn from(a: A) -> Self {
        [0; 2]
    }
}

impl From<A> for [u8; 3] {
    fn from(a: A) -> Self {
        [0; 3]
    }
}

fn main() {
    let a = A;
    let [_, _] = a.into();
}