]> git.proxmox.com Git - rustc.git/blame - src/test/ui/mismatched_types/closure-arg-type-mismatch.nll.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / mismatched_types / closure-arg-type-mismatch.nll.stderr
CommitLineData
f035d41b
XL
1error[E0631]: type mismatch in closure arguments
2 --> $DIR/closure-arg-type-mismatch.rs:3:14
3 |
4LL | a.iter().map(|_: (u32, u32)| 45);
5 | ^^^ ------------------ found signature of `fn((u32, u32)) -> _`
6 | |
7 | expected signature of `fn(&(u32, u32)) -> _`
3c0e092e
XL
8 |
9note: required by a bound in `map`
10 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
11 |
12LL | F: FnMut(Self::Item) -> B,
13 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
f035d41b
XL
14
15error[E0631]: type mismatch in closure arguments
16 --> $DIR/closure-arg-type-mismatch.rs:4:14
17 |
18LL | a.iter().map(|_: &(u16, u16)| 45);
19 | ^^^ ------------------- found signature of `for<'r> fn(&'r (u16, u16)) -> _`
20 | |
21 | expected signature of `fn(&(u32, u32)) -> _`
3c0e092e
XL
22 |
23note: required by a bound in `map`
24 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
25 |
26LL | F: FnMut(Self::Item) -> B,
27 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
f035d41b
XL
28
29error[E0631]: type mismatch in closure arguments
30 --> $DIR/closure-arg-type-mismatch.rs:5:14
31 |
32LL | a.iter().map(|_: (u16, u16)| 45);
33 | ^^^ ------------------ found signature of `fn((u16, u16)) -> _`
34 | |
35 | expected signature of `fn(&(u32, u32)) -> _`
3c0e092e
XL
36 |
37note: required by a bound in `map`
38 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
39 |
40LL | F: FnMut(Self::Item) -> B,
41 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
f035d41b
XL
42
43error: aborting due to 3 previous errors
44
45For more information about this error, try `rustc --explain E0631`.