]>
Commit | Line | Data |
---|---|---|
60c5eb7d | 1 | // check-pass |
69743fb6 XL |
2 | |
3 | trait Foo<Args> { | |
4 | type Output; | |
5 | } | |
6 | ||
7 | trait Bar<'a, T>: for<'s> Foo<&'s T, Output=bool> { | |
8 | fn cb(&self) -> Box<dyn Bar<'a, T, Output=bool>>; | |
9 | } | |
10 | ||
11 | impl<'s> Foo<&'s ()> for () { | |
12 | type Output = bool; | |
13 | } | |
14 | ||
15 | impl<'a> Bar<'a, ()> for () { | |
16 | fn cb(&self) -> Box<dyn Bar<'a, (), Output=bool>> { | |
17 | Box::new(*self) | |
18 | } | |
19 | } | |
20 | ||
21 | fn main() { | |
22 | let _t = ().cb(); | |
23 | } |