1- error: useless conversion to the same type
1+ error: useless conversion to the same type: `T`
22 --> $DIR/useless_conversion.rs:6:13
33 |
44LL | let _ = T::from(val);
@@ -10,61 +10,61 @@ note: the lint level is defined here
1010LL | #![deny(clippy::useless_conversion)]
1111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
13- error: useless conversion to the same type
13+ error: useless conversion to the same type: `T`
1414 --> $DIR/useless_conversion.rs:7:5
1515 |
1616LL | val.into()
1717 | ^^^^^^^^^^ help: consider removing `.into()`: `val`
1818
19- error: useless conversion to the same type
19+ error: useless conversion to the same type: `i32`
2020 --> $DIR/useless_conversion.rs:19:22
2121 |
2222LL | let _: i32 = 0i32.into();
2323 | ^^^^^^^^^^^ help: consider removing `.into()`: `0i32`
2424
25- error: useless conversion to the same type
25+ error: useless conversion to the same type: `std::string::String`
2626 --> $DIR/useless_conversion.rs:60:21
2727 |
2828LL | let _: String = "foo".to_string().into();
2929 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `"foo".to_string()`
3030
31- error: useless conversion to the same type
31+ error: useless conversion to the same type: `std::string::String`
3232 --> $DIR/useless_conversion.rs:61:21
3333 |
3434LL | let _: String = From::from("foo".to_string());
3535 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `From::from()`: `"foo".to_string()`
3636
37- error: useless conversion to the same type
37+ error: useless conversion to the same type: `std::string::String`
3838 --> $DIR/useless_conversion.rs:62:13
3939 |
4040LL | let _ = String::from("foo".to_string());
4141 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `"foo".to_string()`
4242
43- error: useless conversion to the same type
43+ error: useless conversion to the same type: `std::string::String`
4444 --> $DIR/useless_conversion.rs:63:13
4545 |
4646LL | let _ = String::from(format!("A: {:04}", 123));
4747 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("A: {:04}", 123)`
4848
49- error: useless conversion to the same type
49+ error: useless conversion to the same type: `std::str::Lines`
5050 --> $DIR/useless_conversion.rs:64:13
5151 |
5252LL | let _ = "".lines().into_iter();
5353 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `"".lines()`
5454
55- error: useless conversion to the same type
55+ error: useless conversion to the same type: `std::vec::IntoIter<i32>`
5656 --> $DIR/useless_conversion.rs:65:13
5757 |
5858LL | let _ = vec![1, 2, 3].into_iter().into_iter();
5959 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `vec![1, 2, 3].into_iter()`
6060
61- error: useless conversion to the same type
61+ error: useless conversion to the same type: `std::string::String`
6262 --> $DIR/useless_conversion.rs:66:21
6363 |
6464LL | let _: String = format!("Hello {}", "world").into();
6565 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!("Hello {}", "world")`
6666
67- error: useless conversion to the same type
67+ error: useless conversion to the same type: `i32`
6868 --> $DIR/useless_conversion.rs:71:13
6969 |
7070LL | let _ = i32::from(a + b) * 3;
0 commit comments