]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/traits-issue-23003-overflow.rs
2f694e3ca7c5ec962e27cb69386cf6615d511712
1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // A variant of traits-issue-23003 in which an infinite series of
12 // types are required. This test now just compiles fine, since the
13 // relevant rules that triggered the overflow were removed.
18 use std
::marker
::PhantomData
;
24 struct Receipt
<A
:Async
> {
25 marker
: PhantomData
<A
>,
32 impl<B
> Async
for Complete
<B
> {
33 type Cancel
= Receipt
<Complete
<Option
<B
>>>;
36 fn foo(_
: Receipt
<Complete
<()>>) { }