]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr
Rollup merge of #105694 - ouz-a:issue_105689, r=estebank
[rust.git] / src / test / ui / mismatched_types / closure-arg-type-mismatch.stderr
index ebff0c19e2bd2cf69e5712a020ad4aae0eeb0159..fab9b7edc0cc5a38bb0c6ab566171b51fa5a4b62 100644 (file)
@@ -2,8 +2,10 @@ error[E0631]: type mismatch in closure arguments
   --> $DIR/closure-arg-type-mismatch.rs:3:14
    |
 LL |     a.iter().map(|_: (u32, u32)| 45);
-   |              ^^^ --------------- found signature defined here
-   |              |
+   |              ^^^ ---------------
+   |              |   |   |
+   |              |   |   help: consider borrowing the argument: `&(u32, u32)`
+   |              |   found signature defined here
    |              expected due to this
    |
    = note: expected closure signature `fn(&(u32, u32)) -> _`