2023-07-02 12:35:19 +00:00
|
|
|
error: it looks like you're trying to convert an array to a tuple
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/tuple_array_conversions.rs:10:13
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
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`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::tuple_array_conversions)]`
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
error: it looks like you're trying to convert a tuple to an array
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/tuple_array_conversions.rs:11:13
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
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
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/tuple_array_conversions.rs:16:53
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
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
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/tuple_array_conversions.rs:17:38
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
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
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/tuple_array_conversions.rs:18:55
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
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
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/tuple_array_conversions.rs:19:38
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | t1.iter().for_each(|&(a, b)| _ = [a, b]);
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= help: use `.into()` instead, or `<[T; N]>::from` if type annotations are needed
|
|
|
|
|
2023-07-31 21:53:53 +00:00
|
|
|
error: it looks like you're trying to convert a tuple to an array
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/tuple_array_conversions.rs:57:22
|
2023-07-31 21:53:53 +00:00
|
|
|
|
|
|
|
|
LL | let _: &[f64] = &[a, b];
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= help: use `.into()` instead, or `<[T; N]>::from` if type annotations are needed
|
|
|
|
|
2023-07-02 12:35:19 +00:00
|
|
|
error: it looks like you're trying to convert an array to a tuple
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/tuple_array_conversions.rs:60:5
|
2023-07-31 21:53:53 +00:00
|
|
|
|
|
|
|
|
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
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/tuple_array_conversions.rs:104:13
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
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
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/tuple_array_conversions.rs:105:13
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|