1 error: this creates an owned instance just for comparison
2 --> $DIR/with_suggestion.rs:7:14
4 LL | 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/with_suggestion.rs:9:9
12 LL | "foo".to_string() != x;
13 | ^^^^^^^^^^^^^^^^^ help: try: `"foo"`
15 error: this creates an owned instance just for comparison
16 --> $DIR/with_suggestion.rs:16:10
18 LL | x != "foo".to_owned();
19 | ^^^^^^^^^^^^^^^^ help: try: `"foo"`
21 error: this creates an owned instance just for comparison
22 --> $DIR/with_suggestion.rs:18:10
24 LL | x != String::from("foo");
25 | ^^^^^^^^^^^^^^^^^^^ help: try: `"foo"`
27 error: this creates an owned instance just for comparison
28 --> $DIR/with_suggestion.rs:22:5
30 LL | Foo.to_owned() == Foo;
31 | ^^^^^^^^^^^^^^ help: try: `Foo`
33 error: this creates an owned instance just for comparison
34 --> $DIR/with_suggestion.rs:24:30
36 LL | "abc".chars().filter(|c| c.to_owned() != 'X');
37 | ^^^^^^^^^^^^ help: try: `*c`
39 error: aborting due to 6 previous errors