Only allow #[serde(default)]` on structs

This commit is contained in:
Thomas de Zeeuw
2017-02-21 00:15:00 +01:00
parent 9444db5f19
commit 7bee779514
3 changed files with 24 additions and 1 deletions
@@ -0,0 +1,8 @@
#[macro_use]
extern crate serde_derive;
#[derive(Deserialize)] //~ ERROR: proc-macro derive panicked
#[serde(default)] //~^ HELP: #[serde(default)] can only be used on structs
struct T(u8, u8);
fn main() { }