about summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-05-26 14:30:30 +0000
committerbors <bors@rust-lang.org>2018-05-26 14:30:30 +0000
commit1594c6c650dfbb9606ead602548b96997d507f64 (patch)
treef52ab926a396ac7bb5ec505171f27a45f065a443 /src/libsyntax/ast.rs
parent7a0e6a837fd597bfc9b7765c53f1c62a12b57779 (diff)
parent626818fc42cbcd50305daf79f83c3cfa24d6073f (diff)
downloadrust-1594c6c650dfbb9606ead602548b96997d507f64.tar.gz
rust-1594c6c650dfbb9606ead602548b96997d507f64.zip
Auto merge of #51052 - nikomatsakis:obsolete-arrow, r=petrochenkov
restore emplacement syntax (obsolete)

Fix https://github.com/rust-lang/rust/issues/50832

r? @petrochenkov
Diffstat (limited to 'src/libsyntax/ast.rs')
-rw-r--r--src/libsyntax/ast.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index c9843de547f..df7d4807c5c 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -1010,6 +1010,7 @@ impl Expr {
     pub fn precedence(&self) -> ExprPrecedence {
         match self.node {
             ExprKind::Box(_) => ExprPrecedence::Box,
+            ExprKind::ObsoleteInPlace(..) => ExprPrecedence::ObsoleteInPlace,
             ExprKind::Array(_) => ExprPrecedence::Array,
             ExprKind::Call(..) => ExprPrecedence::Call,
             ExprKind::MethodCall(..) => ExprPrecedence::MethodCall,
@@ -1068,6 +1069,8 @@ pub enum RangeLimits {
 pub enum ExprKind {
     /// A `box x` expression.
     Box(P<Expr>),
+    /// First expr is the place; second expr is the value.
+    ObsoleteInPlace(P<Expr>, P<Expr>),
     /// An array (`[a, b, c, d]`)
     Array(Vec<P<Expr>>),
     /// A function call