Parse closure movability
diff --git a/src/expr.rs b/src/expr.rs
index 2bd1099..11cee91 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -313,6 +313,7 @@
/// *This type is available if Syn is built with the `"full"` feature.*
pub Closure(ExprClosure #full {
pub attrs: Vec<Attribute>,
+ pub movability: Option<Token![static]>,
pub capture: Option<Token![move]>,
pub or1_token: Token![|],
pub inputs: Punctuated<FnArg, Token![,]>,
@@ -1967,6 +1968,7 @@
#[cfg(feature = "full")]
named!(expr_closure(allow_struct: bool) -> Expr, do_parse!(
+ movability: option!(keyword!(static)) >>
capture: option!(keyword!(move)) >>
or1: punct!(|) >>
inputs: call!(Punctuated::parse_terminated_with, fn_arg) >>
@@ -1987,6 +1989,7 @@
) >>
(ExprClosure {
attrs: Vec::new(),
+ movability: movability,
capture: capture,
or1_token: or1,
inputs: inputs,
@@ -3106,6 +3109,7 @@
impl ToTokens for ExprClosure {
fn to_tokens(&self, tokens: &mut Tokens) {
tokens.append_all(self.attrs.outer());
+ self.movability.to_tokens(tokens);
self.capture.to_tokens(tokens);
self.or1_token.to_tokens(tokens);
for input in self.inputs.pairs() {