Test if #[allow] works
This commit is contained in:
parent
771d2220d2
commit
1b1b41a5e6
@ -28,6 +28,11 @@ fn main() {
|
||||
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());
|
||||
|
@ -23,20 +23,20 @@ error: identical conversion
|
||||
| ^^^^^^^^^^^ 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()`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user