]>
Commit | Line | Data |
---|---|---|
532ac7d7 | 1 | error[E0631]: type mismatch in function arguments |
e1599b0c | 2 | --> $DIR/issue-60283.rs:14:13 |
532ac7d7 | 3 | | |
e1599b0c XL |
4 | LL | pub fn foo<T, F>(_: T, _: F) |
5 | | --- | |
6 | LL | where T: for<'a> Trait<'a>, | |
7 | LL | F: for<'a> FnMut(<T as Trait<'a>>::Item) {} | |
8 | | ------------------------------------- required by this bound in `foo` | |
9 | ... | |
532ac7d7 | 10 | LL | foo((), drop) |
e1599b0c XL |
11 | | ^^^^ |
12 | | | | |
13 | | expected signature of `for<'a> fn(<() as Trait<'a>>::Item) -> _` | |
14 | | found signature of `fn(_) -> _` | |
532ac7d7 XL |
15 | |
16 | error[E0271]: type mismatch resolving `for<'a> <fn(_) {std::mem::drop::<_>} as std::ops::FnOnce<(<() as Trait<'a>>::Item,)>>::Output == ()` | |
17 | --> $DIR/issue-60283.rs:14:5 | |
18 | | | |
e1599b0c XL |
19 | LL | pub fn foo<T, F>(_: T, _: F) |
20 | | --- | |
21 | LL | where T: for<'a> Trait<'a>, | |
22 | LL | F: for<'a> FnMut(<T as Trait<'a>>::Item) {} | |
23 | | ----------------------------- required by this bound in `foo` | |
24 | ... | |
532ac7d7 XL |
25 | LL | foo((), drop) |
26 | | ^^^ expected bound lifetime parameter 'a, found concrete lifetime | |
532ac7d7 XL |
27 | |
28 | error: aborting due to 2 previous errors | |
29 | ||
48663c56 | 30 | For more information about this error, try `rustc --explain E0271`. |