ed713d67d6
Cleaning the empty lines for clarity.
33 lines
1.0 KiB
Plaintext
33 lines
1.0 KiB
Plaintext
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
|
|
|