]> git.proxmox.com Git - rustc.git/blame - src/test/ui/mismatched_types/E0631.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / mismatched_types / E0631.stderr
CommitLineData
ea8adc8c 1error[E0631]: type mismatch in closure arguments
0731742a 2 --> $DIR/E0631.rs:7:5
ea8adc8c 3 |
e1599b0c 4LL | fn foo<F: Fn(usize)>(_: F) {}
ba9703b0 5 | --------- required by this bound in `foo`
e1599b0c 6...
532ac7d7 7LL | foo(|_: isize| {});
ff7c6d11 8 | ^^^ ---------- found signature of `fn(isize) -> _`
ea8adc8c
XL
9 | |
10 | expected signature of `fn(usize) -> _`
ea8adc8c
XL
11
12error[E0631]: type mismatch in closure arguments
0731742a 13 --> $DIR/E0631.rs:8:5
ea8adc8c 14 |
e1599b0c 15LL | fn bar<F: Fn<usize>>(_: F) {}
ba9703b0 16 | --------- required by this bound in `bar`
e1599b0c 17...
532ac7d7 18LL | bar(|_: isize| {});
ff7c6d11 19 | ^^^ ---------- found signature of `fn(isize) -> _`
ea8adc8c
XL
20 | |
21 | expected signature of `fn(usize) -> _`
ea8adc8c
XL
22
23error[E0631]: type mismatch in function arguments
e1599b0c 24 --> $DIR/E0631.rs:9:9
ea8adc8c 25 |
e1599b0c 26LL | fn foo<F: Fn(usize)>(_: F) {}
ba9703b0 27 | --------- required by this bound in `foo`
e1599b0c 28...
0531ce1d 29LL | fn f(_: u64) {}
ff7c6d11
XL
30 | ------------ found signature of `fn(u64) -> _`
31...
532ac7d7 32LL | foo(f);
e1599b0c 33 | ^ expected signature of `fn(usize) -> _`
ea8adc8c
XL
34
35error[E0631]: type mismatch in function arguments
e1599b0c 36 --> $DIR/E0631.rs:10:9
ea8adc8c 37 |
e1599b0c 38LL | fn bar<F: Fn<usize>>(_: F) {}
ba9703b0 39 | --------- required by this bound in `bar`
e1599b0c 40LL | fn main() {
0531ce1d 41LL | fn f(_: u64) {}
ff7c6d11
XL
42 | ------------ found signature of `fn(u64) -> _`
43...
532ac7d7 44LL | bar(f);
e1599b0c 45 | ^ expected signature of `fn(usize) -> _`
ea8adc8c
XL
46
47error: aborting due to 4 previous errors
48
60c5eb7d 49For more information about this error, try `rustc --explain E0631`.