@@ -1605,45 +1605,6 @@ pub struct FnSig {
1605
1605
pub decl : P < FnDecl > ,
1606
1606
}
1607
1607
1608
- /// Represents associated items.
1609
- /// These include items in `impl` and `trait` definitions.
1610
- #[ derive( Clone , RustcEncodable , RustcDecodable , Debug ) ]
1611
- pub struct AssocItem {
1612
- pub attrs : Vec < Attribute > ,
1613
- pub id : NodeId ,
1614
- pub span : Span ,
1615
- pub vis : Visibility ,
1616
- pub ident : Ident ,
1617
-
1618
- pub defaultness : Defaultness ,
1619
- pub kind : AssocItemKind ,
1620
- /// See `Item::tokens` for what this is.
1621
- pub tokens : Option < TokenStream > ,
1622
- }
1623
-
1624
- /// Represents various kinds of content within an `impl`.
1625
- ///
1626
- /// The term "provided" in the variants below refers to the item having a default
1627
- /// definition / body. Meanwhile, a "required" item lacks a definition / body.
1628
- /// In an implementation, all items must be provided.
1629
- /// The `Option`s below denote the bodies, where `Some(_)`
1630
- /// means "provided" and conversely `None` means "required".
1631
- #[ derive( Clone , RustcEncodable , RustcDecodable , Debug ) ]
1632
- pub enum AssocItemKind {
1633
- /// An associated constant, `const $ident: $ty $def?;` where `def ::= "=" $expr? ;`.
1634
- /// If `def` is parsed, then the associated constant is provided, and otherwise required.
1635
- Const ( P < Ty > , Option < P < Expr > > ) ,
1636
-
1637
- /// An associated function.
1638
- Fn ( FnSig , Generics , Option < P < Block > > ) ,
1639
-
1640
- /// An associated type.
1641
- TyAlias ( Generics , GenericBounds , Option < P < Ty > > ) ,
1642
-
1643
- /// A macro expanding to an associated item.
1644
- Macro ( Mac ) ,
1645
- }
1646
-
1647
1608
#[ derive(
1648
1609
Clone ,
1649
1610
Copy ,
@@ -2664,3 +2625,42 @@ impl ForeignItemKind {
2664
2625
}
2665
2626
}
2666
2627
}
2628
+
2629
+ /// Represents associated items.
2630
+ /// These include items in `impl` and `trait` definitions.
2631
+ #[ derive( Clone , RustcEncodable , RustcDecodable , Debug ) ]
2632
+ pub struct AssocItem {
2633
+ pub attrs : Vec < Attribute > ,
2634
+ pub id : NodeId ,
2635
+ pub span : Span ,
2636
+ pub vis : Visibility ,
2637
+ pub ident : Ident ,
2638
+
2639
+ pub defaultness : Defaultness ,
2640
+ pub kind : AssocItemKind ,
2641
+ /// See `Item::tokens` for what this is.
2642
+ pub tokens : Option < TokenStream > ,
2643
+ }
2644
+
2645
+ /// Represents various kinds of content within an `impl`.
2646
+ ///
2647
+ /// The term "provided" in the variants below refers to the item having a default
2648
+ /// definition / body. Meanwhile, a "required" item lacks a definition / body.
2649
+ /// In an implementation, all items must be provided.
2650
+ /// The `Option`s below denote the bodies, where `Some(_)`
2651
+ /// means "provided" and conversely `None` means "required".
2652
+ #[ derive( Clone , RustcEncodable , RustcDecodable , Debug ) ]
2653
+ pub enum AssocItemKind {
2654
+ /// An associated constant, `const $ident: $ty $def?;` where `def ::= "=" $expr? ;`.
2655
+ /// If `def` is parsed, then the associated constant is provided, and otherwise required.
2656
+ Const ( P < Ty > , Option < P < Expr > > ) ,
2657
+
2658
+ /// An associated function.
2659
+ Fn ( FnSig , Generics , Option < P < Block > > ) ,
2660
+
2661
+ /// An associated type.
2662
+ TyAlias ( Generics , GenericBounds , Option < P < Ty > > ) ,
2663
+
2664
+ /// A macro expanding to an associated item.
2665
+ Macro ( Mac ) ,
2666
+ }
0 commit comments