1 error: useless conversion to the same type: `T`
2 --> $DIR/useless_conversion_try.rs:4:13
4 LL | let _ = T::try_from(val).unwrap();
7 = help: consider removing `T::try_from()`
8 note: the lint level is defined here
9 --> $DIR/useless_conversion_try.rs:1:9
11 LL | #![deny(clippy::useless_conversion)]
12 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
14 error: useless conversion to the same type: `T`
15 --> $DIR/useless_conversion_try.rs:5:5
17 LL | val.try_into().unwrap()
20 = help: consider removing `.try_into()`
22 error: useless conversion to the same type: `std::string::String`
23 --> $DIR/useless_conversion_try.rs:27:21
25 LL | let _: String = "foo".to_string().try_into().unwrap();
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 = help: consider removing `.try_into()`
30 error: useless conversion to the same type: `std::string::String`
31 --> $DIR/useless_conversion_try.rs:28:21
33 LL | let _: String = TryFrom::try_from("foo".to_string()).unwrap();
34 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36 = help: consider removing `TryFrom::try_from()`
38 error: useless conversion to the same type: `std::string::String`
39 --> $DIR/useless_conversion_try.rs:29:13
41 LL | let _ = String::try_from("foo".to_string()).unwrap();
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 = help: consider removing `String::try_from()`
46 error: useless conversion to the same type: `std::string::String`
47 --> $DIR/useless_conversion_try.rs:30:13
49 LL | let _ = String::try_from(format!("A: {:04}", 123)).unwrap();
50 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52 = help: consider removing `String::try_from()`
54 error: useless conversion to the same type: `std::string::String`
55 --> $DIR/useless_conversion_try.rs:31:21
57 LL | let _: String = format!("Hello {}", "world").try_into().unwrap();
58 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60 = help: consider removing `.try_into()`
62 error: useless conversion to the same type: `std::string::String`
63 --> $DIR/useless_conversion_try.rs:32:21
65 LL | let _: String = String::new().try_into().unwrap();
66 | ^^^^^^^^^^^^^^^^^^^^^^^^
68 = help: consider removing `.try_into()`
70 error: useless conversion to the same type: `std::string::String`
71 --> $DIR/useless_conversion_try.rs:33:27
73 LL | let _: String = match String::from("_").try_into() {
74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76 = help: consider removing `.try_into()`
78 error: aborting due to 9 previous errors