2017-05-11 16:59:36 +00:00
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/cmp_owned.rs:18:14
|
|
|
|
|
|
|
|
|
18 | x != "foo".to_string();
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `"foo"`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::cmp-owned` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2017-05-11 16:59:36 +00:00
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/cmp_owned.rs:20:9
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
20 | "foo".to_string() != x;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `"foo"`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2017-05-11 16:59:36 +00:00
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/cmp_owned.rs:27:10
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
27 | x != "foo".to_owned();
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `"foo"`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2017-05-11 16:59:36 +00:00
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/cmp_owned.rs:29:10
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
29 | x != String::from("foo");
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `"foo"`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2017-05-11 16:59:36 +00:00
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/cmp_owned.rs:33:5
|
2017-05-11 16:59:36 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
33 | Foo.to_owned() == Foo;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^ help: try: `Foo`
|
2017-05-11 16:59:36 +00:00
|
|
|
|
2017-05-17 12:19:44 +00:00
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-09 02:04:29 +00:00
|
|
|
--> $DIR/cmp_owned.rs:35:30
|
2017-05-11 16:59:36 +00:00
|
|
|
|
|
2018-10-09 02:04:29 +00:00
|
|
|
35 | "abc".chars().filter(|c| c.to_owned() != 'X');
|
|
|
|
| ^^^^^^^^^^^^ help: try: `*c`
|
|
|
|
|
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-10 02:25:03 +00:00
|
|
|
--> $DIR/cmp_owned.rs:42:5
|
2018-10-09 02:04:29 +00:00
|
|
|
|
|
2018-10-10 02:25:03 +00:00
|
|
|
42 | y.to_owned() == *x;
|
2018-10-12 11:34:41 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating
|
2017-05-17 12:19:44 +00:00
|
|
|
|
2018-10-10 02:25:03 +00:00
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-10 11:51:06 +00:00
|
|
|
--> $DIR/cmp_owned.rs:47:5
|
2018-10-10 02:25:03 +00:00
|
|
|
|
|
2018-10-10 11:51:06 +00:00
|
|
|
47 | y.to_owned() == **x;
|
2018-10-12 11:34:41 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating
|
2018-10-10 11:51:06 +00:00
|
|
|
|
|
|
|
error: this creates an owned instance just for comparison
|
|
|
|
--> $DIR/cmp_owned.rs:54:9
|
|
|
|
|
|
|
|
|
54 | self.to_owned() == *other
|
2018-10-10 02:25:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating
|
|
|
|
|
2018-10-10 11:51:06 +00:00
|
|
|
error: aborting due to 9 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|