1 error: useless conversion to the same type: `T`
2 --> $DIR/useless_conversion_try.rs:6:13
4 LL | let _ = T::try_from(val).unwrap();
7 note: the lint level is defined here
8 --> $DIR/useless_conversion_try.rs:1:9
10 LL | #![deny(clippy::useless_conversion)]
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
12 = help: consider removing `T::try_from()`
14 error: useless conversion to the same type: `T`
15 --> $DIR/useless_conversion_try.rs:7: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:29: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:30: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:31: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:32: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:33: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:34:21
65 LL | let _: String = "".to_owned().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:35: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