Implements alias annotation and allow multiple deserialization renames.

This commit is contained in:
Lymia Aluysia
2019-01-15 10:35:09 -06:00
parent b605cd1bb9
commit 1ed228b92b
8 changed files with 389 additions and 145 deletions
@@ -1,10 +0,0 @@
use serde_derive::Serialize;
#[derive(Serialize)]
struct S {
#[serde(rename = "x")]
#[serde(rename(deserialize = "y"))]
x: (),
}
fn main() {}
@@ -1,8 +0,0 @@
error: duplicate serde attribute `rename`
--> $DIR/rename-rename-de.rs:6:13
|
6 | #[serde(rename(deserialize = "y"))]
| ^^^^^^
error: aborting due to previous error