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