]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/parse/parser/expr.rs
Stabilize `param_attrs` in Rust 1.39.0
[rust.git] / src / libsyntax / parse / parser / expr.rs
index 4dbb5ff75eb216225a8015a7c68593eee8d129b5..b383498b7b64d7fa72b0f80282df2a2ae048e0fc 100644 (file)
@@ -1176,7 +1176,7 @@ fn parse_fn_block_decl(&mut self) -> PResult<'a, P<FnDecl>> {
     /// Parses a parameter in a closure header (e.g., `|arg, arg|`).
     fn parse_fn_block_param(&mut self) -> PResult<'a, Param> {
         let lo = self.token.span;
-        let attrs = self.parse_param_attributes()?;
+        let attrs = self.parse_outer_attributes()?;
         let pat = self.parse_pat(PARAM_EXPECTED)?;
         let t = if self.eat(&token::Colon) {
             self.parse_ty()?
@@ -1193,7 +1193,8 @@ fn parse_fn_block_param(&mut self) -> PResult<'a, Param> {
             ty: t,
             pat,
             span,
-            id: DUMMY_NODE_ID
+            id: DUMMY_NODE_ID,
+            is_placeholder: false,
         })
     }
 
@@ -1455,6 +1456,7 @@ fn parse_match_expr(&mut self, mut attrs: ThinVec<Attribute>) -> PResult<'a, P<E
             body: expr,
             span: lo.to(hi),
             id: DUMMY_NODE_ID,
+            is_placeholder: false,
         })
     }
 
@@ -1611,6 +1613,7 @@ pub(super) fn parse_struct_expr(
                         is_shorthand: false,
                         attrs: ThinVec::new(),
                         id: DUMMY_NODE_ID,
+                        is_placeholder: false,
                     });
                 }
             }
@@ -1697,6 +1700,7 @@ fn parse_field(&mut self) -> PResult<'a, Field> {
             is_shorthand,
             attrs: attrs.into(),
             id: DUMMY_NODE_ID,
+            is_placeholder: false,
         })
     }