mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 13:47:58 +00:00
Fix handling of Self keyword in type definition
This commit is contained in:
@@ -8,13 +8,17 @@ use bound;
|
||||
use dummy;
|
||||
use fragment::{Expr, Fragment, Match, Stmts};
|
||||
use internals::ast::{Container, Data, Field, Style, Variant};
|
||||
use internals::{attr, ungroup, Ctxt, Derive};
|
||||
use internals::{attr, replace_receiver, ungroup, Ctxt, Derive};
|
||||
use pretend;
|
||||
|
||||
use std::collections::BTreeSet;
|
||||
use std::ptr;
|
||||
|
||||
pub fn expand_derive_deserialize(input: &syn::DeriveInput) -> Result<TokenStream, Vec<syn::Error>> {
|
||||
pub fn expand_derive_deserialize(
|
||||
input: &mut syn::DeriveInput,
|
||||
) -> Result<TokenStream, Vec<syn::Error>> {
|
||||
replace_receiver(input);
|
||||
|
||||
let ctxt = Ctxt::new();
|
||||
let cont = match Container::from_ast(&ctxt, input, Derive::Deserialize) {
|
||||
Some(cont) => cont,
|
||||
|
||||
Reference in New Issue
Block a user