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