1 error: this creates an owned instance just for comparison
2 --> $DIR/cmp_owned.rs:18:14
4 18 | x != "foo".to_string();
5 | ^^^^^^^^^^^^^^^^^ help: try: `"foo"`
7 = note: `-D clippy::cmp-owned` implied by `-D warnings`
9 error: this creates an owned instance just for comparison
10 --> $DIR/cmp_owned.rs:20:9
12 20 | "foo".to_string() != x;
13 | ^^^^^^^^^^^^^^^^^ help: try: `"foo"`
15 error: this creates an owned instance just for comparison
16 --> $DIR/cmp_owned.rs:27:10
18 27 | x != "foo".to_owned();
19 | ^^^^^^^^^^^^^^^^ help: try: `"foo"`
21 error: this creates an owned instance just for comparison
22 --> $DIR/cmp_owned.rs:29:10
24 29 | x != String::from("foo");
25 | ^^^^^^^^^^^^^^^^^^^ help: try: `"foo"`
27 error: this creates an owned instance just for comparison
28 --> $DIR/cmp_owned.rs:33:5
30 33 | Foo.to_owned() == Foo;
31 | ^^^^^^^^^^^^^^ help: try: `Foo`
33 error: this creates an owned instance just for comparison
34 --> $DIR/cmp_owned.rs:35:30
36 35 | "abc".chars().filter(|c| c.to_owned() != 'X');
37 | ^^^^^^^^^^^^ help: try: `*c`
39 error: this creates an owned instance just for comparison
40 --> $DIR/cmp_owned.rs:42:5
42 42 | y.to_owned() == *x;
43 | ^^^^^^^^^^^^^^^^^^ help: try: `y == x`
45 error: this creates an owned instance just for comparison
46 --> $DIR/cmp_owned.rs:47:5
48 47 | y.to_owned() == **x;
49 | ^^^^^^^^^^^^^^^^^^^ help: try: `y == *x`
51 error: this creates an owned instance just for comparison
52 --> $DIR/cmp_owned.rs:54:9
54 54 | self.to_owned() == *other
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating
57 error: aborting due to 9 previous errors