mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 02:28:00 +00:00
Update to syntex 0.52
This commit is contained in:
@@ -38,11 +38,11 @@ fn syntex_registry() -> syntex::Registry {
|
||||
|
||||
impl fold::Folder for StripAttributeFolder {
|
||||
fn fold_attribute(&mut self, attr: ast::Attribute) -> Option<ast::Attribute> {
|
||||
match attr.node.value.node {
|
||||
ast::MetaItemKind::List(ref n, _) if n == &"serde" => { return None; }
|
||||
_ => {}
|
||||
if attr.value.name == "serde" {
|
||||
if let ast::MetaItemKind::List(..) = attr.value.node {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
|
||||
Some(attr)
|
||||
}
|
||||
|
||||
@@ -118,11 +118,10 @@ macro_rules! shim {
|
||||
struct MarkSerdeAttributesUsed;
|
||||
impl visit::Visitor for MarkSerdeAttributesUsed {
|
||||
fn visit_attribute(&mut self, attr: &ast::Attribute) {
|
||||
match attr.node.value.node {
|
||||
ast::MetaItemKind::List(ref name, _) if name == "serde" => {
|
||||
if attr.value.name == "serde" {
|
||||
if let ast::MetaItemKind::List(..) = attr.value.node {
|
||||
attr::mark_used(attr);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user