1 error: this creates an owned instance just for comparison
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
12 10 | "foo".to_string() != x;
13 | ^^^^^^^^^^^^^^^^^ help: try `"foo"`
15 = note: `-D cmp-owned` implied by `-D warnings`
17 error: this creates an owned instance just for comparison
18 --> cmp_owned.rs:17:10
20 17 | x != "foo".to_owned();
21 | ^^^^^^^^^^^^^^^^ help: try `"foo"`
23 = note: `-D cmp-owned` implied by `-D warnings`
25 error: this creates an owned instance just for comparison
26 --> cmp_owned.rs:19:10
28 19 | x != String::from("foo");
29 | ^^^^^^^^^^^^^^^^^^^ help: try `"foo"`
31 = note: `-D cmp-owned` implied by `-D warnings`
33 error: this creates an owned instance just for comparison
36 23 | Foo.to_owned() == Foo;
37 | ^^^^^^^^^^^^^^ help: try `Foo`
39 = note: `-D cmp-owned` implied by `-D warnings`
41 error: this creates an owned instance just for comparison
44 30 | self.to_owned() == *other
45 | ^^^^^^^^^^^^^^^ try calling implementing the comparison without allocating
47 = note: `-D cmp-owned` implied by `-D warnings`
49 error: aborting due to previous error(s)
51 error: Could not compile `clippy_tests`.
53 To learn more, run the command again with --verbose.