]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/issue-23003-overflow.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / traits / issue-23003-overflow.rs
CommitLineData
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
8use std::marker::PhantomData;
9
10trait Async {
11 type Cancel;
12}
13
14struct Receipt<A:Async> {
15 marker: PhantomData<A>,
16}
17
18struct Complete<B> {
19 core: Option<B>,
20}
21
22impl<B> Async for Complete<B> {
23 type Cancel = Receipt<Complete<Option<B>>>;
24}
25
e9174d1e 26fn foo(_: Receipt<Complete<()>>) { }
c34b1796 27
a1dfa0c6
XL
28
29fn main() { }