diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/mismatched_types/closure-arg-type-mismatch.stderr (renamed from src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr) | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr b/tests/ui/mismatched_types/closure-arg-type-mismatch.stderr index 92d545b73..811ff0533 100644 --- a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr +++ b/tests/ui/mismatched_types/closure-arg-type-mismatch.stderr @@ -10,9 +10,10 @@ LL | a.iter().map(|_: (u32, u32)| 45); 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 | F: FnMut(Self::Item) -> B, - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map` +LL | a.iter().map(|_: &(u32, u32)| 45); + | + error[E0631]: type mismatch in closure arguments --> $DIR/closure-arg-type-mismatch.rs:4:14 @@ -26,9 +27,6 @@ LL | a.iter().map(|_: &(u16, u16)| 45); found closure signature `for<'a> fn(&'a (u16, u16)) -> _` note: required by a bound in `map` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - | -LL | F: FnMut(Self::Item) -> B, - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map` error[E0631]: type mismatch in closure arguments --> $DIR/closure-arg-type-mismatch.rs:5:14 @@ -42,9 +40,6 @@ LL | a.iter().map(|_: (u16, u16)| 45); found closure signature `fn((u16, u16)) -> _` note: required by a bound in `map` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - | -LL | F: FnMut(Self::Item) -> B, - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map` error: aborting due to 3 previous errors |