1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
error: it looks like you're trying to convert an array to a tuple
--> tests/ui/tuple_array_conversions.rs:10:13
|
LL | let x = (x[0], x[1]);
| ^^^^^^^^^^^^
|
= help: use `.into()` instead, or `<(T0, T1, ..., Tn)>::from` if type annotations are needed
= note: `-D clippy::tuple-array-conversions` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::tuple_array_conversions)]`
error: it looks like you're trying to convert a tuple to an array
--> tests/ui/tuple_array_conversions.rs:12:13
|
LL | let x = [x.0, x.1];
| ^^^^^^^^^^
|
= help: use `.into()` instead, or `<[T; N]>::from` if type annotations are needed
error: it looks like you're trying to convert a tuple to an array
--> tests/ui/tuple_array_conversions.rs:18:53
|
LL | let v1: Vec<[u32; 2]> = t1.iter().map(|&(a, b)| [a, b]).collect();
| ^^^^^^
|
= help: use `.into()` instead, or `<[T; N]>::from` if type annotations are needed
error: it looks like you're trying to convert a tuple to an array
--> tests/ui/tuple_array_conversions.rs:20:38
|
LL | t1.iter().for_each(|&(a, b)| _ = [a, b]);
| ^^^^^^
|
= help: use `.into()` instead, or `<[T; N]>::from` if type annotations are needed
error: it looks like you're trying to convert an array to a tuple
--> tests/ui/tuple_array_conversions.rs:22:55
|
LL | let t2: Vec<(u32, u32)> = v1.iter().map(|&[a, b]| (a, b)).collect();
| ^^^^^^
|
= help: use `.into()` instead, or `<(T0, T1, ..., Tn)>::from` if type annotations are needed
error: it looks like you're trying to convert a tuple to an array
--> tests/ui/tuple_array_conversions.rs:24:38
|
LL | t1.iter().for_each(|&(a, b)| _ = [a, b]);
| ^^^^^^
|
= help: use `.into()` instead, or `<[T; N]>::from` if type annotations are needed
error: it looks like you're trying to convert a tuple to an array
--> tests/ui/tuple_array_conversions.rs:63:22
|
LL | let _: &[f64] = &[a, b];
| ^^^^^^
|
= help: use `.into()` instead, or `<[T; N]>::from` if type annotations are needed
error: it looks like you're trying to convert an array to a tuple
--> tests/ui/tuple_array_conversions.rs:67:5
|
LL | (src, dest);
| ^^^^^^^^^^^
|
= help: use `.into()` instead, or `<(T0, T1, ..., Tn)>::from` if type annotations are needed
error: it looks like you're trying to convert an array to a tuple
--> tests/ui/tuple_array_conversions.rs:112:13
|
LL | let x = (x[0], x[1]);
| ^^^^^^^^^^^^
|
= help: use `.into()` instead, or `<(T0, T1, ..., Tn)>::from` if type annotations are needed
error: it looks like you're trying to convert a tuple to an array
--> tests/ui/tuple_array_conversions.rs:114:13
|
LL | let x = [x.0, x.1];
| ^^^^^^^^^^
|
= help: use `.into()` instead, or `<[T; N]>::from` if type annotations are needed
error: aborting due to 10 previous errors
|