]> git.lizzy.rs Git - rust.git/blob - tests/ui/array-slice-vec/infer_array_len.rs
Rollup merge of #106715 - BoxyUwU:new_solver_triagebot, r=lcnr
[rust.git] / tests / ui / array-slice-vec / infer_array_len.rs
1 // see issue #70529
2 struct A;
3
4 impl From<A> for [u8; 2] {
5     fn from(a: A) -> Self {
6         [0; 2]
7     }
8 }
9
10 impl From<A> for [u8; 3] {
11     fn from(a: A) -> Self {
12         [0; 3]
13     }
14 }
15
16
17 fn main() {
18     let a = A;
19     let [_, _] = a.into();
20     //~^ ERROR type annotations needed
21 }