Skip to content

Commit 5ebe086

Browse files
committed
Update syn dependency to 0.15.34
1 parent ff4dc45 commit 5ebe086

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

futures-async-macro/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ std = []
2121
[dependencies]
2222
proc-macro2 = "0.4"
2323
quote = "0.6"
24-
syn = { version = "0.15.31", features = ["full", "fold"] }
24+
syn = { version = "0.15.34", features = ["full", "fold"] }

futures-async-macro/src/lib.rs

+5-10
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use proc_macro2::{Span, TokenStream as TokenStream2, TokenTree as TokenTree2};
1010
use quote::{quote, ToTokens};
1111
use syn::{
1212
fold::{self, Fold},
13-
token, ArgCaptured, Error, Expr, ExprForLoop, ExprMacro, ExprYield, FnArg, FnDecl, Ident, Item,
14-
ItemFn, Pat, PatIdent, ReturnType, TypeTuple,
13+
token, ArgCaptured, Error, Expr, ExprCall, ExprForLoop, ExprMacro, ExprYield, FnArg, FnDecl,
14+
Ident, Item, ItemFn, Pat, PatIdent, ReturnType, TypeTuple,
1515
};
1616

1717
#[macro_use]
@@ -298,14 +298,9 @@ impl Expand {
298298
if self.0 == Stream && expr.mac.path.is_ident("await") {
299299
return self.expand_await_macros(expr);
300300
} else if expr.mac.path.is_ident("async_stream_block") {
301-
// FIXME: When added Parse impl for ExprCall, replace `if let ..` + `unreachable!()`
302-
// with `let` + `.unwrap()`
303-
if let Ok(Expr::Call(mut e)) = syn::parse(async_stream_block(expr.mac.tts.into())) {
304-
e.attrs.append(&mut expr.attrs);
305-
return Expr::Call(e);
306-
} else {
307-
unreachable!()
308-
}
301+
let mut e: ExprCall = syn::parse(async_stream_block(expr.mac.tts.into())).unwrap();
302+
e.attrs.append(&mut expr.attrs);
303+
return Expr::Call(e);
309304
}
310305

311306
Expr::Macro(expr)

futures-select-macro/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ std = []
2222
proc-macro2 = "0.4"
2323
proc-macro-hack = "0.5.3"
2424
quote = "0.6"
25-
syn = { version = "0.15.31", features = ["full"] }
25+
syn = { version = "0.15.34", features = ["full"] }

0 commit comments

Comments
 (0)