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