mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
ed713d67d6
Cleaning the empty lines for clarity.
32 lines
1 KiB
Text
32 lines
1 KiB
Text
error: this creates an owned instance just for comparison. Consider using `x != "foo"` to compare without allocation
|
|
--> $DIR/cmp_owned.rs:8:14
|
|
|
|
|
8 | x != "foo".to_string();
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: lint level defined here
|
|
--> $DIR/cmp_owned.rs:4:8
|
|
|
|
|
4 | #[deny(cmp_owned)]
|
|
| ^^^^^^^^^
|
|
|
|
error: this creates an owned instance just for comparison. Consider using `"foo" != x` to compare without allocation
|
|
--> $DIR/cmp_owned.rs:10:9
|
|
|
|
|
10 | "foo".to_string() != x;
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: this creates an owned instance just for comparison. Consider using `x != "foo"` to compare without allocation
|
|
--> $DIR/cmp_owned.rs:17:10
|
|
|
|
|
17 | x != "foo".to_owned();
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: this creates an owned instance just for comparison. Consider using `x != "foo"` to compare without allocation
|
|
--> $DIR/cmp_owned.rs:22:10
|
|
|
|
|
22 | x != String::from("foo");
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 4 previous errors
|
|
|