pub is_placeholder: bool,
}
-/// Values inside meta item lists.
-///
-/// E.g., each of `Clone`, `Copy` in `#[derive(Clone, Copy)]`.
-#[derive(Clone, Encodable, Decodable, Debug, HashStable_Generic)]
-pub enum NestedMetaItem {
- /// A full MetaItem, for recursive meta items.
- MetaItem(MetaItem),
-
- /// A literal.
- ///
- /// E.g., `"foo"`, `64`, `true`.
- Lit(MetaItemLit),
-}
-
/// A semantic representation of a meta item. A meta item is a slightly
/// restricted form of an attribute -- it can only contain expressions in
/// certain leaf positions, rather than arbitrary token streams -- that is used
NameValue(MetaItemLit),
}
+/// Values inside meta item lists.
+///
+/// E.g., each of `Clone`, `Copy` in `#[derive(Clone, Copy)]`.
+#[derive(Clone, Encodable, Decodable, Debug, HashStable_Generic)]
+pub enum NestedMetaItem {
+ /// A full MetaItem, for recursive meta items.
+ MetaItem(MetaItem),
+
+ /// A literal.
+ ///
+ /// E.g., `"foo"`, `64`, `true`.
+ Lit(MetaItemLit),
+}
+
/// A block (`{ .. }`).
///
/// E.g., `{ .. }` as in `fn foo() { .. }`.
}
}
-#[derive(Clone, Encodable, Decodable, Debug, HashStable_Generic)]
-pub struct AttrItem {
- pub path: Path,
- pub args: AttrArgs,
- pub tokens: Option<LazyAttrTokenStream>,
-}
-
/// A list of attributes.
pub type AttrVec = ThinVec<Attribute>;
pub span: Span,
}
-#[derive(Clone, Encodable, Decodable, Debug)]
-pub struct NormalAttr {
- pub item: AttrItem,
- pub tokens: Option<LazyAttrTokenStream>,
-}
-
#[derive(Clone, Encodable, Decodable, Debug)]
pub enum AttrKind {
/// A normal attribute.
DocComment(CommentKind, Symbol),
}
+#[derive(Clone, Encodable, Decodable, Debug)]
+pub struct NormalAttr {
+ pub item: AttrItem,
+ pub tokens: Option<LazyAttrTokenStream>,
+}
+
+#[derive(Clone, Encodable, Decodable, Debug, HashStable_Generic)]
+pub struct AttrItem {
+ pub path: Path,
+ pub args: AttrArgs,
+ pub tokens: Option<LazyAttrTokenStream>,
+}
+
/// `TraitRef`s appear in impls.
///
/// Resolution maps each `TraitRef`'s `ref_id` to its defining trait; that's all