]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-22777.rs
Rollup merge of #60492 - acrrd:issues/54054_chain, r=SimonSapin
[rust.git] / src / test / ui / issues / issue-22777.rs
1 // build-pass (FIXME(62277): could be check-pass?)
2 // This test is reduced from libsyntax.  It is just checking that we
3 // can successfully deal with a "deep" structure, which the drop-check
4 // was hitting a recursion limit on at one point.
5
6 // pretty-expanded FIXME #23616
7
8 #![allow(non_camel_case_types)]
9
10 pub fn noop_fold_impl_item() -> SmallVector<ImplItem> {
11     loop  { }
12 }
13
14 pub struct SmallVector<T>(P<T>);
15 pub struct ImplItem(P<S01_Method>);
16
17 struct P<T>(Box<T>);
18
19 struct S01_Method(P<S02_Generics>);
20 struct S02_Generics(P<S03_TyParam>);
21 struct S03_TyParam(P<S04_TyParamBound>);
22 struct S04_TyParamBound(S05_PolyTraitRef);
23 struct S05_PolyTraitRef(S06_TraitRef);
24 struct S06_TraitRef(S07_Path);
25 struct S07_Path(Vec<S08_PathSegment>);
26 struct S08_PathSegment(S09_GenericArgs);
27 struct S09_GenericArgs(P<S10_ParenthesizedParameterData>);
28 struct S10_ParenthesizedParameterData(Option<P<S11_Ty>>);
29 struct S11_Ty(P<S12_Expr>);
30 struct S12_Expr(P<S13_Block>);
31 struct S13_Block(Vec<P<S14_Stmt>>);
32 struct S14_Stmt(P<S15_Decl>);
33 struct S15_Decl(P<S16_Local>);
34 struct S16_Local(P<S17_Pat>);
35 struct S17_Pat(P<S18_Mac>);
36 struct S18_Mac(Vec<P<S19_TokenTree>>);
37 struct S19_TokenTree(P<S20_Token>);
38 struct S20_Token(P<S21_Nonterminal>);
39 struct S21_Nonterminal(P<S22_Item>);
40 struct S22_Item(P<S23_EnumDef>);
41 struct S23_EnumDef(Vec<P<S24_Variant>>);
42 struct S24_Variant(P<S25_VariantKind>);
43 struct S25_VariantKind(P<S26_StructDef>);
44 struct S26_StructDef(Vec<P<S27_StructField>>);
45 struct S27_StructField(P<S28_StructFieldKind>);
46 struct S28_StructFieldKind;
47
48 pub fn main() {}