From 00cc8a1b0cd634d495d4b7114d8bd9be3b09fbe5 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sat, 7 Dec 2019 02:40:48 +0100 Subject: [PATCH] simplify parse_assoc_op_cast --- src/librustc_parse/parser/expr.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs index 141da96e8341..b9675eb437c0 100644 --- a/src/librustc_parse/parser/expr.rs +++ b/src/librustc_parse/parser/expr.rs @@ -596,14 +596,7 @@ impl<'a> Parser<'a> { op_noun, ); let span_after_type = parser_snapshot_after_type.token.span; - let expr = mk_expr( - self, - P(Ty { - span: path.span, - kind: TyKind::Path(None, path), - id: DUMMY_NODE_ID, - }), - ); + let expr = mk_expr(self, self.mk_ty(path.span, TyKind::Path(None, path))); let expr_str = self .span_to_snippet(expr.span)