Fix handling of Self keyword in type definition

This commit is contained in:
Taiki Endo
2020-10-24 05:45:12 +09:00
parent f6e7366b46
commit c67017d466
8 changed files with 315 additions and 6 deletions
+2 -2
View File
@@ -86,8 +86,8 @@ pub fn derive_serialize(input: TokenStream) -> TokenStream {
#[proc_macro_derive(Deserialize, attributes(serde))]
pub fn derive_deserialize(input: TokenStream) -> TokenStream {
let input = parse_macro_input!(input as DeriveInput);
de::expand_derive_deserialize(&input)
let mut input = parse_macro_input!(input as DeriveInput);
de::expand_derive_deserialize(&mut input)
.unwrap_or_else(to_compile_errors)
.into()
}