]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/mismatched_types/closure-arg-type-mismatch.stderr
Auto merge of #105650 - cassaundra:float-literal-suggestion, r=pnkfelix
[rust.git] / tests / ui / mismatched_types / closure-arg-type-mismatch.stderr
index fab9b7edc0cc5a38bb0c6ab566171b51fa5a4b62..811ff0533f0124ff219f580a458a4d1d830af712 100644 (file)
@@ -2,16 +2,18 @@ error[E0631]: type mismatch in closure arguments
   --> $DIR/closure-arg-type-mismatch.rs:3:14
    |
 LL |     a.iter().map(|_: (u32, u32)| 45);
-   |              ^^^ ---------------
-   |              |   |   |
-   |              |   |   help: consider borrowing the argument: `&(u32, u32)`
-   |              |   found signature defined here
+   |              ^^^ --------------- found signature defined here
+   |              |
    |              expected due to this
    |
    = note: expected closure signature `fn(&(u32, u32)) -> _`
               found closure signature `fn((u32, u32)) -> _`
 note: required by a bound in `map`
   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+help: consider borrowing the argument
+   |
+LL |     a.iter().map(|_: &(u32, u32)| 45);
+   |                      +
 
 error[E0631]: type mismatch in closure arguments
   --> $DIR/closure-arg-type-mismatch.rs:4:14