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