diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-04-01 21:48:39 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-04-12 23:02:09 +0300 |
| commit | 44acea4d880b646caa00a7237ea1a17031dd2116 (patch) | |
| tree | f109f2beda49e7972c2c6e562944c1a2c810c3d2 /src/libsyntax/print | |
| parent | 6c537493d01694cc6e0a614dff12c475055aa2b4 (diff) | |
| download | rust-44acea4d880b646caa00a7237ea1a17031dd2116.tar.gz rust-44acea4d880b646caa00a7237ea1a17031dd2116.zip | |
AST/HIR: Merge field access expressions for named and numeric fields
Diffstat (limited to 'src/libsyntax/print')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 8168db19058..3741850b8a9 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1966,8 +1966,7 @@ impl<'a> State<'a> { args: &[P<ast::Expr>]) -> io::Result<()> { let prec = match func.node { - ast::ExprKind::Field(..) | - ast::ExprKind::TupField(..) => parser::PREC_FORCE_PAREN, + ast::ExprKind::Field(..) => parser::PREC_FORCE_PAREN, _ => parser::PREC_POSTFIX, }; @@ -2203,11 +2202,6 @@ impl<'a> State<'a> { self.s.word(".")?; self.print_ident(ident)?; } - ast::ExprKind::TupField(ref expr, id) => { - self.print_expr_maybe_paren(expr, parser::PREC_POSTFIX)?; - self.s.word(".")?; - self.print_usize(id.node)?; - } ast::ExprKind::Index(ref expr, ref index) => { self.print_expr_maybe_paren(expr, parser::PREC_POSTFIX)?; self.s.word("[")?; |
