diff options
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/diagnostics.rs | 9 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 9 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser/expr.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser/generics.rs | 7 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser/item.rs | 3 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser/pat.rs | 1 |
6 files changed, 30 insertions, 5 deletions
diff --git a/src/libsyntax/parse/diagnostics.rs b/src/libsyntax/parse/diagnostics.rs index 3120d0e3517..b74f2492c35 100644 --- a/src/libsyntax/parse/diagnostics.rs +++ b/src/libsyntax/parse/diagnostics.rs @@ -29,7 +29,14 @@ crate fn dummy_arg(ident: Ident) -> Param { span: ident.span, id: ast::DUMMY_NODE_ID }; - Param { attrs: ThinVec::default(), id: ast::DUMMY_NODE_ID, pat, span: ident.span, ty: P(ty) } + Param { + attrs: ThinVec::default(), + id: ast::DUMMY_NODE_ID, + pat, + span: ident.span, + ty: P(ty), + is_placeholder: false, + } } pub enum Error { diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index fcaf5065dac..fcebfa29962 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1040,7 +1040,14 @@ impl<'a> Parser<'a> { let span = lo.to(self.token.span); - Ok(Param { attrs: attrs.into(), id: DUMMY_NODE_ID, pat, span, ty }) + Ok(Param { + attrs: attrs.into(), + id: ast::DUMMY_NODE_ID, + is_placeholder: false, + pat, + span, + ty, + }) } /// Parses mutability (`mut` or nothing). diff --git a/src/libsyntax/parse/parser/expr.rs b/src/libsyntax/parse/parser/expr.rs index 4dbb5ff75eb..31b28443abb 100644 --- a/src/libsyntax/parse/parser/expr.rs +++ b/src/libsyntax/parse/parser/expr.rs @@ -1193,7 +1193,8 @@ impl<'a> Parser<'a> { ty: t, pat, span, - id: DUMMY_NODE_ID + id: DUMMY_NODE_ID, + is_placeholder: false, }) } @@ -1455,6 +1456,7 @@ impl<'a> Parser<'a> { body: expr, span: lo.to(hi), id: DUMMY_NODE_ID, + is_placeholder: false, }) } @@ -1611,6 +1613,7 @@ impl<'a> Parser<'a> { is_shorthand: false, attrs: ThinVec::new(), id: DUMMY_NODE_ID, + is_placeholder: false, }); } } @@ -1697,6 +1700,7 @@ impl<'a> Parser<'a> { is_shorthand, attrs: attrs.into(), id: DUMMY_NODE_ID, + is_placeholder: false, }) } diff --git a/src/libsyntax/parse/parser/generics.rs b/src/libsyntax/parse/parser/generics.rs index 54f24f8ef2b..3e6118ad86f 100644 --- a/src/libsyntax/parse/parser/generics.rs +++ b/src/libsyntax/parse/parser/generics.rs @@ -49,7 +49,8 @@ impl<'a> Parser<'a> { bounds, kind: GenericParamKind::Type { default, - } + }, + is_placeholder: false }) } @@ -66,7 +67,8 @@ impl<'a> Parser<'a> { bounds: Vec::new(), kind: GenericParamKind::Const { ty, - } + }, + is_placeholder: false }) } @@ -90,6 +92,7 @@ impl<'a> Parser<'a> { attrs: attrs.into(), bounds, kind: ast::GenericParamKind::Lifetime, + is_placeholder: false }); } else if self.check_keyword(kw::Const) { // Parse const parameter. diff --git a/src/libsyntax/parse/parser/item.rs b/src/libsyntax/parse/parser/item.rs index be7fc48fdaf..baae6155f34 100644 --- a/src/libsyntax/parse/parser/item.rs +++ b/src/libsyntax/parse/parser/item.rs @@ -1575,6 +1575,7 @@ impl<'a> Parser<'a> { data: struct_def, disr_expr, span: vlo.to(self.prev_span), + is_placeholder: false, }; variants.push(vr); @@ -1730,6 +1731,7 @@ impl<'a> Parser<'a> { id: DUMMY_NODE_ID, ty, attrs, + is_placeholder: false, }) }).map(|(r, _)| r) } @@ -1821,6 +1823,7 @@ impl<'a> Parser<'a> { id: DUMMY_NODE_ID, ty, attrs, + is_placeholder: false, }) } diff --git a/src/libsyntax/parse/parser/pat.rs b/src/libsyntax/parse/parser/pat.rs index 49f8d58c6a7..08ee3a6bd86 100644 --- a/src/libsyntax/parse/parser/pat.rs +++ b/src/libsyntax/parse/parser/pat.rs @@ -882,6 +882,7 @@ impl<'a> Parser<'a> { attrs: attrs.into(), id: ast::DUMMY_NODE_ID, span: lo.to(hi), + is_placeholder: false, }) } |
