2017-05-11 18:59:36 +02:00
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-06 09:18:06 -07: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 21:05:30 +01:00
|
|
|
|
2017-05-11 18:59:36 +02:00
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-06 09:18:06 -07:00
|
|
|
--> $DIR/cmp_owned.rs:20:9
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-10-06 09:18:06 -07:00
|
|
|
20 | "foo".to_string() != x;
|
2017-07-21 10:40:23 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `"foo"`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
2017-05-11 18:59:36 +02:00
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-06 09:18:06 -07:00
|
|
|
--> $DIR/cmp_owned.rs:27:10
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-10-06 09:18:06 -07:00
|
|
|
27 | x != "foo".to_owned();
|
2017-07-21 10:40:23 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `"foo"`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
2017-05-11 18:59:36 +02:00
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-06 09:18:06 -07:00
|
|
|
--> $DIR/cmp_owned.rs:29:10
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-10-06 09:18:06 -07:00
|
|
|
29 | x != String::from("foo");
|
2017-07-21 10:40:23 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `"foo"`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
2017-05-11 18:59:36 +02:00
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-06 09:18:06 -07:00
|
|
|
--> $DIR/cmp_owned.rs:33:5
|
2017-05-11 18:59:36 +02:00
|
|
|
|
|
2018-10-06 09:18:06 -07:00
|
|
|
33 | Foo.to_owned() == Foo;
|
2017-07-21 10:40:23 +02:00
|
|
|
| ^^^^^^^^^^^^^^ help: try: `Foo`
|
2017-05-11 18:59:36 +02:00
|
|
|
|
2017-05-17 14:19:44 +02:00
|
|
|
error: this creates an owned instance just for comparison
|
2018-10-06 09:18:06 -07:00
|
|
|
--> $DIR/cmp_owned.rs:40:9
|
2017-05-11 18:59:36 +02:00
|
|
|
|
|
2018-10-06 09:18:06 -07:00
|
|
|
40 | self.to_owned() == *other
|
2017-05-11 18:59:36 +02:00
|
|
|
| ^^^^^^^^^^^^^^^ try calling implementing the comparison without allocating
|
2017-05-17 14:19:44 +02:00
|
|
|
|
2018-01-16 17:06:27 +01:00
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|