@@ -479,20 +479,6 @@ pub struct Crate {
479
479
pub is_placeholder : bool ,
480
480
}
481
481
482
- /// Values inside meta item lists.
483
- ///
484
- /// E.g., each of `Clone`, `Copy` in `#[derive(Clone, Copy)]`.
485
- #[ derive( Clone , Encodable , Decodable , Debug , HashStable_Generic ) ]
486
- pub enum NestedMetaItem {
487
- /// A full MetaItem, for recursive meta items.
488
- MetaItem ( MetaItem ) ,
489
-
490
- /// A literal.
491
- ///
492
- /// E.g., `"foo"`, `64`, `true`.
493
- Lit ( MetaItemLit ) ,
494
- }
495
-
496
482
/// A semantic representation of a meta item. A meta item is a slightly
497
483
/// restricted form of an attribute -- it can only contain expressions in
498
484
/// certain leaf positions, rather than arbitrary token streams -- that is used
@@ -525,6 +511,20 @@ pub enum MetaItemKind {
525
511
NameValue ( MetaItemLit ) ,
526
512
}
527
513
514
+ /// Values inside meta item lists.
515
+ ///
516
+ /// E.g., each of `Clone`, `Copy` in `#[derive(Clone, Copy)]`.
517
+ #[ derive( Clone , Encodable , Decodable , Debug , HashStable_Generic ) ]
518
+ pub enum NestedMetaItem {
519
+ /// A full MetaItem, for recursive meta items.
520
+ MetaItem ( MetaItem ) ,
521
+
522
+ /// A literal.
523
+ ///
524
+ /// E.g., `"foo"`, `64`, `true`.
525
+ Lit ( MetaItemLit ) ,
526
+ }
527
+
528
528
/// A block (`{ .. }`).
529
529
///
530
530
/// E.g., `{ .. }` as in `fn foo() { .. }`.
@@ -2574,13 +2574,6 @@ impl<D: Decoder> Decodable<D> for AttrId {
2574
2574
}
2575
2575
}
2576
2576
2577
- #[ derive( Clone , Encodable , Decodable , Debug , HashStable_Generic ) ]
2578
- pub struct AttrItem {
2579
- pub path : Path ,
2580
- pub args : AttrArgs ,
2581
- pub tokens : Option < LazyAttrTokenStream > ,
2582
- }
2583
-
2584
2577
/// A list of attributes.
2585
2578
pub type AttrVec = ThinVec < Attribute > ;
2586
2579
@@ -2595,12 +2588,6 @@ pub struct Attribute {
2595
2588
pub span : Span ,
2596
2589
}
2597
2590
2598
- #[ derive( Clone , Encodable , Decodable , Debug ) ]
2599
- pub struct NormalAttr {
2600
- pub item : AttrItem ,
2601
- pub tokens : Option < LazyAttrTokenStream > ,
2602
- }
2603
-
2604
2591
#[ derive( Clone , Encodable , Decodable , Debug ) ]
2605
2592
pub enum AttrKind {
2606
2593
/// A normal attribute.
@@ -2612,6 +2599,19 @@ pub enum AttrKind {
2612
2599
DocComment ( CommentKind , Symbol ) ,
2613
2600
}
2614
2601
2602
+ #[ derive( Clone , Encodable , Decodable , Debug ) ]
2603
+ pub struct NormalAttr {
2604
+ pub item : AttrItem ,
2605
+ pub tokens : Option < LazyAttrTokenStream > ,
2606
+ }
2607
+
2608
+ #[ derive( Clone , Encodable , Decodable , Debug , HashStable_Generic ) ]
2609
+ pub struct AttrItem {
2610
+ pub path : Path ,
2611
+ pub args : AttrArgs ,
2612
+ pub tokens : Option < LazyAttrTokenStream > ,
2613
+ }
2614
+
2615
2615
/// `TraitRef`s appear in impls.
2616
2616
///
2617
2617
/// Resolution maps each `TraitRef`'s `ref_id` to its defining trait; that's all
0 commit comments