Update to syntex 0.52

This commit is contained in:
David Tolnay
2016-12-24 12:42:23 -05:00
parent 57d3fce0c6
commit 2401ae61a8
2 changed files with 8 additions and 9 deletions
+6 -7
View File
@@ -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);
}
_ => {}
}
}
}