2020-05-26 16:40:42 +00:00
|
|
|
error: useless conversion to the same type
|
2020-05-22 09:46:17 +00:00
|
|
|
--> $DIR/useless_conversion_try.rs:6:13
|
2020-05-09 19:28:31 +00:00
|
|
|
|
|
2020-05-22 09:46:17 +00:00
|
|
|
LL | let _ = T::try_from(val).unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2020-05-09 19:28:31 +00:00
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/useless_conversion_try.rs:1:9
|
|
|
|
|
|
|
|
|
LL | #![deny(clippy::useless_conversion)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
= help: consider removing `T::try_from()`
|
|
|
|
|
2020-05-26 16:40:42 +00:00
|
|
|
error: useless conversion to the same type
|
2020-05-22 09:46:17 +00:00
|
|
|
--> $DIR/useless_conversion_try.rs:7:5
|
|
|
|
|
|
|
|
|
LL | val.try_into().unwrap()
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `.try_into()`
|
|
|
|
|
2020-05-26 16:40:42 +00:00
|
|
|
error: useless conversion to the same type
|
2020-05-22 09:46:17 +00:00
|
|
|
--> $DIR/useless_conversion_try.rs:29:21
|
|
|
|
|
|
|
|
|
LL | let _: String = "foo".to_string().try_into().unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `.try_into()`
|
|
|
|
|
2020-05-26 16:40:42 +00:00
|
|
|
error: useless conversion to the same type
|
2020-05-22 09:46:17 +00:00
|
|
|
--> $DIR/useless_conversion_try.rs:30:21
|
2020-05-09 19:28:31 +00:00
|
|
|
|
|
|
|
|
LL | let _: String = TryFrom::try_from("foo".to_string()).unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `TryFrom::try_from()`
|
|
|
|
|
2020-05-26 16:40:42 +00:00
|
|
|
error: useless conversion to the same type
|
2020-05-22 09:46:17 +00:00
|
|
|
--> $DIR/useless_conversion_try.rs:31:13
|
2020-05-09 19:28:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = String::try_from("foo".to_string()).unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `String::try_from()`
|
|
|
|
|
2020-05-26 16:40:42 +00:00
|
|
|
error: useless conversion to the same type
|
2020-05-22 09:46:17 +00:00
|
|
|
--> $DIR/useless_conversion_try.rs:32:13
|
2020-05-09 19:28:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = String::try_from(format!("A: {:04}", 123)).unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `String::try_from()`
|
|
|
|
|
2020-05-26 16:40:42 +00:00
|
|
|
error: useless conversion to the same type
|
2020-05-22 09:46:17 +00:00
|
|
|
--> $DIR/useless_conversion_try.rs:33:21
|
|
|
|
|
|
|
|
|
LL | let _: String = format!("Hello {}", "world").try_into().unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `.try_into()`
|
|
|
|
|
2020-05-26 16:40:42 +00:00
|
|
|
error: useless conversion to the same type
|
|
|
|
--> $DIR/useless_conversion_try.rs:34:21
|
|
|
|
|
|
|
|
|
LL | let _: String = "".to_owned().try_into().unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `.try_into()`
|
|
|
|
|
|
|
|
error: useless conversion to the same type
|
|
|
|
--> $DIR/useless_conversion_try.rs:35:27
|
|
|
|
|
|
|
|
|
LL | let _: String = match String::from("_").try_into() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing `.try_into()`
|
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
2020-05-09 19:28:31 +00:00
|
|
|
|