]>
Commit | Line | Data |
---|---|---|
c34b1796 | 1 | // A variant of traits-issue-23003 in which an infinite series of |
e9174d1e SL |
2 | // types are required. This test now just compiles fine, since the |
3 | // relevant rules that triggered the overflow were removed. | |
4 | ||
60c5eb7d | 5 | // check-pass |
e9174d1e | 6 | #![allow(dead_code)] |
c34b1796 AL |
7 | |
8 | use std::marker::PhantomData; | |
9 | ||
10 | trait Async { | |
11 | type Cancel; | |
12 | } | |
13 | ||
14 | struct Receipt<A:Async> { | |
15 | marker: PhantomData<A>, | |
16 | } | |
17 | ||
18 | struct Complete<B> { | |
19 | core: Option<B>, | |
20 | } | |
21 | ||
22 | impl<B> Async for Complete<B> { | |
23 | type Cancel = Receipt<Complete<Option<B>>>; | |
24 | } | |
25 | ||
e9174d1e | 26 | fn foo(_: Receipt<Complete<()>>) { } |
c34b1796 | 27 | |
a1dfa0c6 XL |
28 | |
29 | fn main() { } |