about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2014-12-16 14:30:30 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2014-12-16 14:30:30 +0100
commit7d4e7f079552a524440d8b5fb656d52661592aee (patch)
tree45dce48e2a077271d9f2c92a06c1b33d17982f0e /src/libsyntax/parse/parser.rs
parent41f5907fa6b04614821277dd63172c5c8f11b6cd (diff)
downloadrust-7d4e7f079552a524440d8b5fb656d52661592aee.tar.gz
rust-7d4e7f079552a524440d8b5fb656d52661592aee.zip
AST refactor: make the place in ExprBox an option.
This is to allow us to migrate away from UnUniq in a followup commit,
and thus unify the code paths related to all forms of `box`.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index b9ef3fdbd49..6e3cfe5854a 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2888,7 +2888,7 @@ impl<'a> Parser<'a> {
                     }
                     let subexpression = self.parse_prefix_expr();
                     hi = subexpression.span.hi;
-                    ex = ExprBox(place, subexpression);
+                    ex = ExprBox(Some(place), subexpression);
                     return self.mk_expr(lo, hi, ex);
                 }
             }
@@ -2896,6 +2896,9 @@ impl<'a> Parser<'a> {
             // Otherwise, we use the unique pointer default.
             let subexpression = self.parse_prefix_expr();
             hi = subexpression.span.hi;
+            // FIXME (pnkfelix): After working out kinks with box
+            // desugaring, should be `ExprBox(None, subexpression)`
+            // instead.
             ex = self.mk_unary(UnUniq, subexpression);
           }
           _ => return self.parse_dot_or_call_expr()