blob: 410ea4b0b3439ebd9f1254d6be34a9b6136c427c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
error[E0631]: type mismatch in closure arguments
--> $DIR/E0631.rs:7:5
|
LL | foo(|_: isize| {});
| ^^^ ---------- found signature defined here
| |
| expected due to this
|
= note: expected closure signature `fn(usize) -> _`
found closure signature `fn(isize) -> _`
note: required by a bound in `foo`
--> $DIR/E0631.rs:3:11
|
LL | fn foo<F: Fn(usize)>(_: F) {}
| ^^^^^^^^^ required by this bound in `foo`
error[E0631]: type mismatch in closure arguments
--> $DIR/E0631.rs:8:5
|
LL | bar(|_: isize| {});
| ^^^ ---------- found signature defined here
| |
| expected due to this
|
= note: expected closure signature `fn(usize) -> _`
found closure signature `fn(isize) -> _`
note: required by a bound in `bar`
--> $DIR/E0631.rs:4:11
|
LL | fn bar<F: Fn<(usize,)>>(_: F) {}
| ^^^^^^^^^^^^ required by this bound in `bar`
error[E0631]: type mismatch in function arguments
--> $DIR/E0631.rs:9:9
|
LL | fn f(_: u64) {}
| ------------ found signature defined here
...
LL | foo(f);
| --- ^ expected due to this
| |
| required by a bound introduced by this call
|
= note: expected function signature `fn(usize) -> _`
found function signature `fn(u64) -> _`
note: required by a bound in `foo`
--> $DIR/E0631.rs:3:11
|
LL | fn foo<F: Fn(usize)>(_: F) {}
| ^^^^^^^^^ required by this bound in `foo`
error[E0631]: type mismatch in function arguments
--> $DIR/E0631.rs:10:9
|
LL | fn f(_: u64) {}
| ------------ found signature defined here
...
LL | bar(f);
| --- ^ expected due to this
| |
| required by a bound introduced by this call
|
= note: expected function signature `fn(usize) -> _`
found function signature `fn(u64) -> _`
note: required by a bound in `bar`
--> $DIR/E0631.rs:4:11
|
LL | fn bar<F: Fn<(usize,)>>(_: F) {}
| ^^^^^^^^^^^^ required by this bound in `bar`
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0631`.
|