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