]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/cmp_owned.stderr
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / cmp_owned.stderr
index d40fb4b8add877faa25126d3efe775dcc435e751..9177c6bd73ed6d189ebcfd8001e88654848b0bc4 100644 (file)
@@ -1,40 +1,58 @@
 error: this creates an owned instance just for comparison
--> $DIR/cmp_owned.rs:8:14
-  |
-8 |         x != "foo".to_string();
-  |              ^^^^^^^^^^^^^^^^^ help: try: `"foo"`
-  |
-  = note: `-D cmp-owned` implied by `-D warnings`
 --> $DIR/cmp_owned.rs:14:14
+   |
+LL |         x != "foo".to_string();
+   |              ^^^^^^^^^^^^^^^^^ help: try: `"foo"`
+   |
+   = note: `-D clippy::cmp-owned` implied by `-D warnings`
 
 error: this creates an owned instance just for comparison
-  --> $DIR/cmp_owned.rs:10:9
+  --> $DIR/cmp_owned.rs:16:9
    |
-10 |         "foo".to_string() != x;
+LL |         "foo".to_string() != x;
    |         ^^^^^^^^^^^^^^^^^ help: try: `"foo"`
 
 error: this creates an owned instance just for comparison
-  --> $DIR/cmp_owned.rs:17:10
+  --> $DIR/cmp_owned.rs:23:10
    |
-17 |     x != "foo".to_owned();
+LL |     x != "foo".to_owned();
    |          ^^^^^^^^^^^^^^^^ help: try: `"foo"`
 
 error: this creates an owned instance just for comparison
-  --> $DIR/cmp_owned.rs:19:10
+  --> $DIR/cmp_owned.rs:25:10
    |
-19 |     x != String::from("foo");
+LL |     x != String::from("foo");
    |          ^^^^^^^^^^^^^^^^^^^ help: try: `"foo"`
 
 error: this creates an owned instance just for comparison
-  --> $DIR/cmp_owned.rs:23:5
+  --> $DIR/cmp_owned.rs:29:5
    |
-23 |     Foo.to_owned() == Foo;
+LL |     Foo.to_owned() == Foo;
    |     ^^^^^^^^^^^^^^ help: try: `Foo`
 
 error: this creates an owned instance just for comparison
-  --> $DIR/cmp_owned.rs:30:9
+  --> $DIR/cmp_owned.rs:31:30
+   |
+LL |     "abc".chars().filter(|c| c.to_owned() != 'X');
+   |                              ^^^^^^^^^^^^ help: try: `*c`
+
+error: this creates an owned instance just for comparison
+  --> $DIR/cmp_owned.rs:38:5
+   |
+LL |     y.to_owned() == *x;
+   |     ^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating
+
+error: this creates an owned instance just for comparison
+  --> $DIR/cmp_owned.rs:43:5
+   |
+LL |     y.to_owned() == **x;
+   |     ^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating
+
+error: this creates an owned instance just for comparison
+  --> $DIR/cmp_owned.rs:50:9
    |
-30 |         self.to_owned() == *other
-   |         ^^^^^^^^^^^^^^^ try calling implementing the comparison without allocating
+LL |         self.to_owned() == *other
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating
 
-error: aborting due to 6 previous errors
+error: aborting due to 9 previous errors