Parse outer attributes on closures
diff --git a/src/expr.rs b/src/expr.rs
index f761d06..6179a57 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -1985,6 +1985,7 @@
#[cfg(feature = "full")]
named!(expr_closure(allow_struct: bool) -> Expr, do_parse!(
+ attrs: many0!(Attribute::parse_outer) >>
movability: option!(keyword!(static)) >>
capture: option!(keyword!(move)) >>
or1: punct!(|) >>
@@ -2005,7 +2006,7 @@
map!(ambiguous_expr!(allow_struct), |e| (ReturnType::Default, e))
) >>
(ExprClosure {
- attrs: Vec::new(),
+ attrs: attrs,
movability: movability,
capture: capture,
or1_token: or1,
diff --git a/tests/common/mod.rs b/tests/common/mod.rs
index 3c4029a..0534438 100644
--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -79,10 +79,6 @@
// #[cfg(unset)] 341
"tests/rust/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs" |
"tests/rust/src/test/run-pass/cfg_stmt_expr.rs" |
- // TODO outer attributes on closures
- //
- // https://github.com/dtolnay/syn/issues/457
- "tests/rust/src/test/run-pass/issue-49632.rs" |
// TODO inner attributes within expressions
//
// https://github.com/dtolnay/syn/issues/458