Add compile-fail test for the with attribute

This commit is contained in:
David Tolnay 2017-02-16 18:43:04 -08:00
parent afa6dfbbe2
commit c590df13b9
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -0,0 +1,10 @@
#[macro_use]
extern crate serde_derive;
#[derive(Serialize)] //~ ERROR: proc-macro derive panicked
struct S {
#[serde(with = "w", serialize_with = "s")] //~^^ HELP: duplicate serde attribute `serialize_with`
x: (),
}
fn main() {}