2017-02-07 14:05:30 -06:00
|
|
|
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
|
2017-05-11 04:41:44 -05:00
|
|
|
--> $DIR/cmp_owned.rs:10:9
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 04:41:44 -05:00
|
|
|
10 | "foo".to_string() != x;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: this creates an owned instance just for comparison. Consider using `x != "foo"` to compare without allocation
|
2017-05-11 04:41:44 -05:00
|
|
|
--> $DIR/cmp_owned.rs:17:10
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 04:41:44 -05:00
|
|
|
17 | x != "foo".to_owned();
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: this creates an owned instance just for comparison. Consider using `x != "foo"` to compare without allocation
|
2017-05-11 04:41:44 -05:00
|
|
|
--> $DIR/cmp_owned.rs:22:10
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 04:41:44 -05:00
|
|
|
22 | x != String::from("foo");
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|