let _: String = "foo".into();
let _: String = From::from("foo");
let _ = String::from("foo");
+ #[allow(identity_conversion)]
+ {
+ let _: String = "foo".into();
+ let _ = String::from("foo");
+ }
let _: String = "foo".to_string().into();
let _: String = From::from("foo".to_string());
| ^^^^^^^^^^^ help: consider removing `.into()`: `0i32`
error: identical conversion
- --> $DIR/identity_conversion.rs:32:21
+ --> $DIR/identity_conversion.rs:37:21
|
-32 | let _: String = "foo".to_string().into();
+37 | let _: String = "foo".to_string().into();
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `"foo".to_string()`
error: identical conversion
- --> $DIR/identity_conversion.rs:33:21
+ --> $DIR/identity_conversion.rs:38:21
|
-33 | let _: String = From::from("foo".to_string());
+38 | let _: String = From::from("foo".to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `From::from()`: `"foo".to_string()`
error: identical conversion
- --> $DIR/identity_conversion.rs:34:13
+ --> $DIR/identity_conversion.rs:39:13
|
-34 | let _ = String::from("foo".to_string());
+39 | let _ = String::from("foo".to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `"foo".to_string()`