| commit | 09462acd4b1b89dd6e11af78973ae2a7ce270270 | [log] [tgz] |
|---|---|---|
| author | David Tolnay <dtolnay@gmail.com> | Fri Mar 20 14:58:41 2020 -0700 |
| committer | David Tolnay <dtolnay@gmail.com> | Fri Mar 20 14:58:56 2020 -0700 |
| tree | 494629ebbc782e3e0293240d59a867e32da21f99 | |
| parent | 30430f13c92a64f571f04b555b908da0b10e67e8 [diff] [blame] |
Disallow shared structs having 0 fields
diff --git a/syntax/mod.rs b/syntax/mod.rs index 7d2ca19..38e21b0 100644 --- a/syntax/mod.rs +++ b/syntax/mod.rs
@@ -13,7 +13,7 @@ pub mod types; use proc_macro2::{Ident, Span, TokenStream}; -use syn::{LitStr, Token}; +use syn::{token::Brace, LitStr, Token}; pub use self::atom::Atom; pub use self::doc::Doc; @@ -40,6 +40,7 @@ pub derives: Vec<Ident>, pub struct_token: Token![struct], pub ident: Ident, + pub brace_token: Brace, pub fields: Vec<Var>, }