]> git.proxmox.com Git - rustc.git/blame - src/test/run-pass/issue-22777.rs
New upstream version 1.19.0+dfsg1
[rustc.git] / src / test / run-pass / issue-22777.rs
CommitLineData
c34b1796
AL
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.
4//
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.
10
11// This test is reduced from libsyntax. It is just checking that we
12// can successfully deal with a "deep" structure, which the drop-check
13// was hitting a recursion limit on at one point.
14
15// pretty-expanded FIXME #23616
16
17#![allow(non_camel_case_types)]
18
19pub fn noop_fold_impl_item() -> SmallVector<ImplItem> {
20 loop { }
21}
22
23pub struct SmallVector<T>(P<T>);
24pub struct ImplItem(P<S01_Method>);
25
26struct P<T>(Box<T>);
27
28struct S01_Method(P<S02_Generics>);
29struct S02_Generics(P<S03_TyParam>);
30struct S03_TyParam(P<S04_TyParamBound>);
31struct S04_TyParamBound(S05_PolyTraitRef);
32struct S05_PolyTraitRef(S06_TraitRef);
33struct S06_TraitRef(S07_Path);
34struct S07_Path(Vec<S08_PathSegment>);
35struct S08_PathSegment(S09_PathParameters);
36struct S09_PathParameters(P<S10_ParenthesizedParameterData>);
37struct S10_ParenthesizedParameterData(Option<P<S11_Ty>>);
38struct S11_Ty(P<S12_Expr>);
39struct S12_Expr(P<S13_Block>);
40struct S13_Block(Vec<P<S14_Stmt>>);
41struct S14_Stmt(P<S15_Decl>);
42struct S15_Decl(P<S16_Local>);
43struct S16_Local(P<S17_Pat>);
44struct S17_Pat(P<S18_Mac>);
45struct S18_Mac(Vec<P<S19_TokenTree>>);
46struct S19_TokenTree(P<S20_Token>);
47struct S20_Token(P<S21_Nonterminal>);
48struct S21_Nonterminal(P<S22_Item>);
49struct S22_Item(P<S23_EnumDef>);
50struct S23_EnumDef(Vec<P<S24_Variant>>);
51struct S24_Variant(P<S25_VariantKind>);
52struct S25_VariantKind(P<S26_StructDef>);
53struct S26_StructDef(Vec<P<S27_StructField>>);
54struct S27_StructField(P<S28_StructFieldKind>);
55struct S28_StructFieldKind;
56
57pub fn main() {}