Skip to content

Commit

Permalink
bless NLL test
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Nov 20, 2021
1 parent d5e982d commit 2a2621d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/ui/mismatched_types/closure-arg-type-mismatch.nll.stderr
Expand Up @@ -5,6 +5,12 @@ LL | a.iter().map(|_: (u32, u32)| 45);
| ^^^ ------------------ found signature of `fn((u32, u32)) -> _`
| |
| expected signature of `fn(&(u32, u32)) -> _`
|
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:4:14
Expand All @@ -13,6 +19,12 @@ LL | a.iter().map(|_: &(u16, u16)| 45);
| ^^^ ------------------- found signature of `for<'r> fn(&'r (u16, u16)) -> _`
| |
| expected signature of `fn(&(u32, u32)) -> _`
|
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
Expand All @@ -21,6 +33,12 @@ LL | a.iter().map(|_: (u16, u16)| 45);
| ^^^ ------------------ found signature of `fn((u16, u16)) -> _`
| |
| expected signature of `fn(&(u32, u32)) -> _`
|
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

Expand Down

0 comments on commit 2a2621d

Please sign in to comment.