serde/test_suite/tests/compile-fail/duplicate-attribute/rename-ser-rename.rs

12 lines
253 B
Rust
Raw Normal View History

2016-09-28 11:55:54 -05:00
#[macro_use]
extern crate serde_derive;
#[derive(Serialize)] //~ ERROR: custom derive attribute panicked
struct S {
#[serde(rename(serialize="x"))]
2016-09-28 14:46:54 -05:00
#[serde(rename="y")] //~^^^ HELP: duplicate serde attribute `rename`
2016-09-28 11:55:54 -05:00
x: (),
}
fn main() {}