Replace deprecated MacroInput; completes c52e13
This commit is contained in:
parent
c7901e532e
commit
b53026a21b
@ -45,7 +45,7 @@ pub enum Style {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Container<'a> {
|
impl<'a> Container<'a> {
|
||||||
pub fn from_ast(cx: &Ctxt, item: &'a syn::MacroInput) -> Container<'a> {
|
pub fn from_ast(cx: &Ctxt, item: &'a syn::DeriveInput) -> Container<'a> {
|
||||||
let attrs = attr::Container::from_ast(cx, item);
|
let attrs = attr::Container::from_ast(cx, item);
|
||||||
|
|
||||||
let mut body = match item.body {
|
let mut body = match item.body {
|
||||||
|
@ -166,7 +166,7 @@ pub enum Identifier {
|
|||||||
|
|
||||||
impl Container {
|
impl Container {
|
||||||
/// Extract out the `#[serde(...)]` attributes from an item.
|
/// Extract out the `#[serde(...)]` attributes from an item.
|
||||||
pub fn from_ast(cx: &Ctxt, item: &syn::MacroInput) -> Self {
|
pub fn from_ast(cx: &Ctxt, item: &syn::DeriveInput) -> Self {
|
||||||
let mut ser_name = Attr::none(cx, "rename");
|
let mut ser_name = Attr::none(cx, "rename");
|
||||||
let mut de_name = Attr::none(cx, "rename");
|
let mut de_name = Attr::none(cx, "rename");
|
||||||
let mut deny_unknown_fields = BoolAttr::none(cx, "deny_unknown_fields");
|
let mut deny_unknown_fields = BoolAttr::none(cx, "deny_unknown_fields");
|
||||||
@ -421,7 +421,7 @@ impl Container {
|
|||||||
|
|
||||||
fn decide_tag(
|
fn decide_tag(
|
||||||
cx: &Ctxt,
|
cx: &Ctxt,
|
||||||
item: &syn::MacroInput,
|
item: &syn::DeriveInput,
|
||||||
untagged: BoolAttr,
|
untagged: BoolAttr,
|
||||||
internal_tag: Attr<String>,
|
internal_tag: Attr<String>,
|
||||||
content: Attr<String>,
|
content: Attr<String>,
|
||||||
@ -477,7 +477,7 @@ fn decide_tag(
|
|||||||
|
|
||||||
fn decide_identifier(
|
fn decide_identifier(
|
||||||
cx: &Ctxt,
|
cx: &Ctxt,
|
||||||
item: &syn::MacroInput,
|
item: &syn::DeriveInput,
|
||||||
field_identifier: BoolAttr,
|
field_identifier: BoolAttr,
|
||||||
variant_identifier: BoolAttr,
|
variant_identifier: BoolAttr,
|
||||||
) -> Identifier {
|
) -> Identifier {
|
||||||
|
Loading…
Reference in New Issue
Block a user