]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-60283.stderr
Rollup merge of #87372 - GuillaumeGomez:move-test_main-calls, r=jyn514
[rust.git] / src / test / ui / issues / issue-60283.stderr
1 error[E0631]: type mismatch in function arguments
2   --> $DIR/issue-60283.rs:17:13
3    |
4 LL | pub fn foo<T, F>(_: T, _: F)
5    |        --- required by a bound in this
6 ...
7 LL |     F: for<'a> FnMut(<T as Trait<'a>>::Item),
8    |                ----------------------------- required by this bound in `foo`
9 ...
10 LL |     foo((), drop)
11    |             ^^^^
12    |             |
13    |             expected signature of `for<'a> fn(<() as Trait<'a>>::Item) -> _`
14    |             found signature of `fn(()) -> _`
15
16 error[E0277]: the size for values of type `<() as Trait<'_>>::Item` cannot be known at compilation time
17   --> $DIR/issue-60283.rs:17:13
18    |
19 LL |     foo((), drop)
20    |             ^^^^ doesn't have a size known at compile-time
21    | 
22   ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL
23    |
24 LL | pub fn drop<T>(_x: T) {}
25    |             - required by this bound in `std::mem::drop`
26    |
27    = help: the trait `Sized` is not implemented for `<() as Trait<'_>>::Item`
28 help: consider further restricting the associated type
29    |
30 LL | fn main() where <() as Trait<'_>>::Item: Sized {
31    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32
33 error: aborting due to 2 previous errors
34
35 Some errors have detailed explanations: E0277, E0631.
36 For more information about an error, try `rustc --explain E0277`.