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