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