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/ast.rs | |
| 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/ast.rs')
| -rw-r--r-- | src/libsyntax/ast.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index e7900af7f12..91c9a1524e1 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1018,7 +1018,6 @@ impl Expr { ExprKind::Assign(..) => ExprPrecedence::Assign, ExprKind::AssignOp(..) => ExprPrecedence::AssignOp, ExprKind::Field(..) => ExprPrecedence::Field, - ExprKind::TupField(..) => ExprPrecedence::TupField, ExprKind::Index(..) => ExprPrecedence::Index, ExprKind::Range(..) => ExprPrecedence::Range, ExprKind::Path(..) => ExprPrecedence::Path, @@ -1133,12 +1132,8 @@ pub enum ExprKind { /// /// For example, `a += 1`. AssignOp(BinOp, P<Expr>, P<Expr>), - /// Access of a named struct field (`obj.foo`) + /// Access of a named (`obj.foo`) or unnamed (`obj.0`) struct field Field(P<Expr>, Ident), - /// Access of an unnamed field of a struct or tuple-struct - /// - /// For example, `foo.0`. - TupField(P<Expr>, Spanned<usize>), /// An indexing operation (`foo[2]`) Index(P<Expr>, P<Expr>), /// A range (`1..2`, `1..`, `..2`, `1...2`, `1...`, `...2`) |
