2020-09-24 07:49:22 -05:00
|
|
|
error: useless conversion to the same type: `T`
|
2022-05-21 06:24:00 -05:00
|
|
|
--> $DIR/useless_conversion_try.rs:4:13
|
2020-05-28 08:45:24 -05:00
|
|
|
|
|
|
|
|
LL | let _ = T::try_from(val).unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-09-22 11:04:22 -05:00
|
|
|
= help: consider removing `T::try_from()`
|
2020-05-28 08:45:24 -05:00
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/useless_conversion_try.rs:1:9
|
|
|
|
|
|
|
|
|
LL | #![deny(clippy::useless_conversion)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-09-24 07:49:22 -05:00
|
|
|
error: useless conversion to the same type: `T`
|
2022-05-21 06:24:00 -05:00
|
|
|
--> $DIR/useless_conversion_try.rs:5:5
|
2020-05-28 08:45:24 -05:00
|
|
|
|
|
|
|
|
LL | val.try_into().unwrap()
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `.try_into()`
|
|
|
|
|
2020-09-24 07:49:22 -05:00
|
|
|
error: useless conversion to the same type: `std::string::String`
|
2022-05-21 06:24:00 -05:00
|
|
|
--> $DIR/useless_conversion_try.rs:27:21
|
2020-05-28 08:45:24 -05:00
|
|
|
|
|
|
|
|
LL | let _: String = "foo".to_string().try_into().unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `.try_into()`
|
|
|
|
|
2020-09-24 07:49:22 -05:00
|
|
|
error: useless conversion to the same type: `std::string::String`
|
2022-05-21 06:24:00 -05:00
|
|
|
--> $DIR/useless_conversion_try.rs:28:21
|
2020-05-28 08:45:24 -05:00
|
|
|
|
|
|
|
|
LL | let _: String = TryFrom::try_from("foo".to_string()).unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `TryFrom::try_from()`
|
|
|
|
|
2020-09-24 07:49:22 -05:00
|
|
|
error: useless conversion to the same type: `std::string::String`
|
2022-05-21 06:24:00 -05:00
|
|
|
--> $DIR/useless_conversion_try.rs:29:13
|
2020-05-28 08:45:24 -05:00
|
|
|
|
|
|
|
|
LL | let _ = String::try_from("foo".to_string()).unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `String::try_from()`
|
|
|
|
|
2020-09-24 07:49:22 -05:00
|
|
|
error: useless conversion to the same type: `std::string::String`
|
2022-05-21 06:24:00 -05:00
|
|
|
--> $DIR/useless_conversion_try.rs:30:13
|
2020-05-28 08:45:24 -05:00
|
|
|
|
|
|
|
|
LL | let _ = String::try_from(format!("A: {:04}", 123)).unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `String::try_from()`
|
|
|
|
|
2020-09-24 07:49:22 -05:00
|
|
|
error: useless conversion to the same type: `std::string::String`
|
2022-05-21 06:24:00 -05:00
|
|
|
--> $DIR/useless_conversion_try.rs:31:21
|
2020-05-28 08:45:24 -05:00
|
|
|
|
|
|
|
|
LL | let _: String = format!("Hello {}", "world").try_into().unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `.try_into()`
|
|
|
|
|
2020-09-24 07:49:22 -05:00
|
|
|
error: useless conversion to the same type: `std::string::String`
|
2022-05-21 06:24:00 -05:00
|
|
|
--> $DIR/useless_conversion_try.rs:32:21
|
2020-05-28 08:45:24 -05:00
|
|
|
|
|
2022-08-31 08:24:45 -05:00
|
|
|
LL | let _: String = String::new().try_into().unwrap();
|
2020-05-28 08:45:24 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `.try_into()`
|
|
|
|
|
2020-09-24 07:49:22 -05:00
|
|
|
error: useless conversion to the same type: `std::string::String`
|
2022-05-21 06:24:00 -05:00
|
|
|
--> $DIR/useless_conversion_try.rs:33:27
|
2020-05-28 08:45:24 -05:00
|
|
|
|
|
|
|
|
LL | let _: String = match String::from("_").try_into() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `.try_into()`
|
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
|
|
|
|