From 75ba52499b077080206bcb0f2131a323de89f955 Mon Sep 17 00:00:00 2001 From: Matthew Maurer Date: Thu, 30 Mar 2023 09:42:58 -0700 Subject: [PATCH] Update to syn 2 (#2730) --- futures-macro/Cargo.toml | 2 +- futures-macro/src/executor.rs | 1 + futures-macro/src/select.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/futures-macro/Cargo.toml b/futures-macro/Cargo.toml index 38e4229b21..046a84c5f0 100644 --- a/futures-macro/Cargo.toml +++ b/futures-macro/Cargo.toml @@ -18,4 +18,4 @@ proc-macro = true [dependencies] proc-macro2 = "1.0" quote = "1.0" -syn = { version = "1.0.56", features = ["full"] } +syn = { version = "2.0.8", features = ["full"] } diff --git a/futures-macro/src/executor.rs b/futures-macro/src/executor.rs index 40a091f94c..7f1d0a93f4 100644 --- a/futures-macro/src/executor.rs +++ b/futures-macro/src/executor.rs @@ -44,6 +44,7 @@ pub(crate) fn test(args: TokenStream, item: TokenStream) -> TokenStream { #path::block_on(async #body) }) .unwrap(), + None, )]; let gen = quote! { diff --git a/futures-macro/src/select.rs b/futures-macro/src/select.rs index 0c8e5f1ca0..2789b3e659 100644 --- a/futures-macro/src/select.rs +++ b/futures-macro/src/select.rs @@ -51,7 +51,7 @@ impl Parse for Select { CaseKind::Default } else { // ` = ` - let pat = input.parse()?; + let pat = Pat::parse_multi_with_leading_vert(input)?; input.parse::()?; let expr = input.parse()?; CaseKind::Normal(pat, expr)