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: `-D cmp-owned` implied by `-D warnings`
9 error: this creates an owned instance just for comparison
10 --> $DIR/cmp_owned.rs:10:9
12 10 | "foo".to_string() != x;
13 | ^^^^^^^^^^^^^^^^^ help: try: `"foo"`
15 error: this creates an owned instance just for comparison
16 --> $DIR/cmp_owned.rs:17:10
18 17 | x != "foo".to_owned();
19 | ^^^^^^^^^^^^^^^^ help: try: `"foo"`
21 error: this creates an owned instance just for comparison
22 --> $DIR/cmp_owned.rs:19:10
24 19 | x != String::from("foo");
25 | ^^^^^^^^^^^^^^^^^^^ help: try: `"foo"`
27 error: this creates an owned instance just for comparison
28 --> $DIR/cmp_owned.rs:23:5
30 23 | Foo.to_owned() == Foo;
31 | ^^^^^^^^^^^^^^ help: try: `Foo`
33 error: this creates an owned instance just for comparison
34 --> $DIR/cmp_owned.rs:30:9
36 30 | self.to_owned() == *other
37 | ^^^^^^^^^^^^^^^ try calling implementing the comparison without allocating
39 error: aborting due to 6 previous errors