diff options
Diffstat (limited to 'src/libsyntax/parse/parser')
| -rw-r--r-- | src/libsyntax/parse/parser/expr.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser/item.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser/ty.rs | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/parse/parser/expr.rs b/src/libsyntax/parse/parser/expr.rs index deb2140f797..c776704b285 100644 --- a/src/libsyntax/parse/parser/expr.rs +++ b/src/libsyntax/parse/parser/expr.rs @@ -555,7 +555,7 @@ impl<'a> Parser<'a> { let span_after_type = parser_snapshot_after_type.token.span; let expr = mk_expr(self, P(Ty { span: path.span, - node: TyKind::Path(None, path), + kind: TyKind::Path(None, path), id: DUMMY_NODE_ID, })); @@ -1190,7 +1190,7 @@ impl<'a> Parser<'a> { } else { P(Ty { id: DUMMY_NODE_ID, - node: TyKind::Infer, + kind: TyKind::Infer, span: self.prev_span, }) }; diff --git a/src/libsyntax/parse/parser/item.rs b/src/libsyntax/parse/parser/item.rs index e96d35e1999..27b0325db12 100644 --- a/src/libsyntax/parse/parser/item.rs +++ b/src/libsyntax/parse/parser/item.rs @@ -678,7 +678,7 @@ impl<'a> Parser<'a> { self.look_ahead(1, |t| t != &token::Lt) { let span = self.prev_span.between(self.token.span); self.struct_span_err(span, "missing trait in a trait impl").emit(); - P(Ty { node: TyKind::Path(None, err_path(span)), span, id: DUMMY_NODE_ID }) + P(Ty { kind: TyKind::Path(None, err_path(span)), span, id: DUMMY_NODE_ID }) } else { self.parse_ty()? }; @@ -715,7 +715,7 @@ impl<'a> Parser<'a> { } let ty_first = ty_first.into_inner(); - let path = match ty_first.node { + let path = match ty_first.kind { // This notably includes paths passed through `ty` macro fragments (#46438). TyKind::Path(None, path) => path, _ => { @@ -1526,7 +1526,7 @@ impl<'a> Parser<'a> { // The user intended that the type be inferred, // so treat this as if the user wrote e.g. `const A: _ = expr;`. P(Ty { - node: TyKind::Infer, + kind: TyKind::Infer, span: id.span, id: ast::DUMMY_NODE_ID, }) diff --git a/src/libsyntax/parse/parser/ty.rs b/src/libsyntax/parse/parser/ty.rs index 5697edd8e48..b4c006ca2b1 100644 --- a/src/libsyntax/parse/parser/ty.rs +++ b/src/libsyntax/parse/parser/ty.rs @@ -55,7 +55,7 @@ impl<'a> Parser<'a> { let lo = self.token.span; let mut impl_dyn_multi = false; - let node = if self.eat(&token::OpenDelim(token::Paren)) { + let kind = if self.eat(&token::OpenDelim(token::Paren)) { // `(TYPE)` is a parenthesized type. // `(TYPE,)` is a tuple with a single field of type TYPE. let mut ts = vec![]; @@ -75,7 +75,7 @@ impl<'a> Parser<'a> { if ts.len() == 1 && !last_comma { let ty = ts.into_iter().nth(0).unwrap().into_inner(); let maybe_bounds = allow_plus && self.token.is_like_plus(); - match ty.node { + match ty.kind { // `(TY_BOUND_NOPAREN) + BOUND + ...`. TyKind::Path(None, ref path) if maybe_bounds => { self.parse_remaining_bounds(Vec::new(), path.clone(), lo, true)? @@ -211,7 +211,7 @@ impl<'a> Parser<'a> { }; let span = lo.to(self.prev_span); - let ty = P(Ty { node, span, id: ast::DUMMY_NODE_ID }); + let ty = P(Ty { kind, span, id: ast::DUMMY_NODE_ID }); // Try to recover from use of `+` with incorrect priority. self.maybe_report_ambiguous_plus(allow_plus, impl_dyn_multi, &ty); |
