]>
Commit | Line | Data |
---|---|---|
532ac7d7 XL |
1 | pub trait Trait<'a> { |
2 | type Item; | |
3 | } | |
4 | ||
5 | impl<'a> Trait<'a> for () { | |
6 | type Item = (); | |
7 | } | |
8 | ||
9 | pub fn foo<T, F>(_: T, _: F) | |
72b1a166 FG |
10 | where |
11 | T: for<'a> Trait<'a>, | |
12 | F: for<'a> FnMut(<T as Trait<'a>>::Item), | |
13 | { | |
14 | } | |
532ac7d7 XL |
15 | |
16 | fn main() { | |
17 | foo((), drop) | |
18 | //~^ ERROR type mismatch in function arguments | |
72b1a166 | 19 | //~| ERROR size for values of type `<() as Trait<'_>>::Item` cannot be known at compilation time |
532ac7d7 | 20 | } |