40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
error: Useless conversion to the same type
|
|
--> $DIR/useless_conversion_try.rs:6:5
|
|
|
|
|
LL | T::try_from(val).unwrap()
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
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()`
|
|
|
|
error: Useless conversion to the same type
|
|
--> $DIR/useless_conversion_try.rs:22:21
|
|
|
|
|
LL | let _: String = TryFrom::try_from("foo".to_string()).unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider removing `TryFrom::try_from()`
|
|
|
|
error: Useless conversion to the same type
|
|
--> $DIR/useless_conversion_try.rs:23:13
|
|
|
|
|
LL | let _ = String::try_from("foo".to_string()).unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider removing `String::try_from()`
|
|
|
|
error: Useless conversion to the same type
|
|
--> $DIR/useless_conversion_try.rs:24:13
|
|
|
|
|
LL | let _ = String::try_from(format!("A: {:04}", 123)).unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider removing `String::try_from()`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|