diff --git a/html5ever/Cargo.toml b/html5ever/Cargo.toml
index 39e79992..8dfd194a 100644
--- a/html5ever/Cargo.toml
+++ b/html5ever/Cargo.toml
@@ -24,7 +24,7 @@ criterion = "0.3"
[build-dependencies]
quote = "1"
-syn = { version = "1", features = ["extra-traits", "full", "fold"] }
+syn = { version = "2", features = ["extra-traits", "full", "fold"] }
proc-macro2 = "1"
[[bench]]
diff --git a/html5ever/macros/match_token.rs b/html5ever/macros/match_token.rs
index 9fbed082..b4bff19f 100644
--- a/html5ever/macros/match_token.rs
+++ b/html5ever/macros/match_token.rs
@@ -197,7 +197,7 @@ impl Parse for LHS {
}
Ok(LHS::Tags(tags))
} else {
- let p: syn::Pat = input.parse()?;
+ let p = input.call(syn::Pat::parse_single)?;
Ok(LHS::Pattern(p))
}
}
@@ -423,7 +423,7 @@ impl Fold for MatchTokenParser {
if mac.path == parse_quote!(match_token) {
return syn::fold::fold_stmt(
self,
- syn::Stmt::Expr(expand_match_token(&mac.tokens)),
+ syn::Stmt::Expr(expand_match_token(&mac.tokens), None),
);
}
},