1 error: this creates an owned instance just for comparison
2 --> $DIR/cmp_owned.rs:8:14
4 8 | x != "foo".to_string();
5 | ^^^^^^^^^^^^^^^^^ help: try `"foo"`
7 note: lint level defined here
8 --> $DIR/cmp_owned.rs:4:8
10 4 | #[deny(cmp_owned)]
13 error: this creates an owned instance just for comparison
14 --> $DIR/cmp_owned.rs:10:9
16 10 | "foo".to_string() != x;
17 | ^^^^^^^^^^^^^^^^^ help: try `"foo"`
19 error: this creates an owned instance just for comparison
20 --> $DIR/cmp_owned.rs:17:10
22 17 | x != "foo".to_owned();
23 | ^^^^^^^^^^^^^^^^ help: try `"foo"`
25 error: this creates an owned instance just for comparison
26 --> $DIR/cmp_owned.rs:19:10
28 19 | x != String::from("foo");
29 | ^^^^^^^^^^^^^^^^^^^ help: try `"foo"`
31 error: this creates an owned instance just for comparison
32 --> $DIR/cmp_owned.rs:23:5
34 23 | Foo.to_owned() == Foo;
35 | ^^^^^^^^^^^^^^ help: try `Foo`
37 warning: this creates an owned instance just for comparison
38 --> $DIR/cmp_owned.rs:30:9
40 30 | self.to_owned() == *other
41 | ^^^^^^^^^^^^^^^ try calling implementing the comparison without allocating
43 = note: #[warn(cmp_owned)] on by default
45 error: aborting due to 5 previous errors