Add wrapper type for tokenizing passthrough attrs
diff --git a/syntax/mod.rs b/syntax/mod.rs
index c478d3c..da21204 100644
--- a/syntax/mod.rs
+++ b/syntax/mod.rs
@@ -25,6 +25,7 @@
pub mod trivial;
pub mod types;
+use self::attrs::OtherAttrs;
use self::discriminant::Discriminant;
use self::namespace::Namespace;
use self::parse::kw;
@@ -32,7 +33,7 @@
use proc_macro2::{Ident, Span};
use syn::punctuated::Punctuated;
use syn::token::{Brace, Bracket, Paren};
-use syn::{Attribute, Expr, Generics, Lifetime, LitInt, Token, Type as RustType};
+use syn::{Expr, Generics, Lifetime, LitInt, Token, Type as RustType};
pub use self::atom::Atom;
pub use self::derive::{Derive, Trait};
@@ -72,7 +73,7 @@
pub lang: Lang,
pub doc: Doc,
pub derives: Vec<Derive>,
- pub attrs: Vec<Attribute>,
+ pub attrs: OtherAttrs,
pub type_token: Token![type],
pub name: Pair,
pub generics: Lifetimes,
@@ -85,7 +86,7 @@
pub struct Struct {
pub doc: Doc,
pub derives: Vec<Derive>,
- pub attrs: Vec<Attribute>,
+ pub attrs: OtherAttrs,
pub visibility: Token![pub],
pub struct_token: Token![struct],
pub name: Pair,
@@ -96,7 +97,7 @@
pub struct Enum {
pub doc: Doc,
pub derives: Vec<Derive>,
- pub attrs: Vec<Attribute>,
+ pub attrs: OtherAttrs,
pub enum_token: Token![enum],
pub name: Pair,
pub brace_token: Brace,
@@ -109,7 +110,7 @@
pub struct ExternFn {
pub lang: Lang,
pub doc: Doc,
- pub attrs: Vec<Attribute>,
+ pub attrs: OtherAttrs,
pub name: Pair,
pub sig: Signature,
pub semi_token: Token![;],
@@ -119,7 +120,7 @@
pub struct TypeAlias {
pub doc: Doc,
pub derives: Vec<Derive>,
- pub attrs: Vec<Attribute>,
+ pub attrs: OtherAttrs,
pub type_token: Token![type],
pub name: Pair,
pub generics: Lifetimes,
@@ -156,7 +157,7 @@
pub struct Var {
pub doc: Doc,
- pub attrs: Vec<Attribute>,
+ pub attrs: OtherAttrs,
pub visibility: Token![pub],
pub ident: Ident,
pub ty: Type,
@@ -176,7 +177,7 @@
pub struct Variant {
pub doc: Doc,
- pub attrs: Vec<Attribute>,
+ pub attrs: OtherAttrs,
pub name: Pair,
pub discriminant: Discriminant,
pub expr: Option<Expr>,