diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-17 08:35:40 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-17 11:50:30 -0800 |
| commit | a02885e167bcc673208c45b5465dbec78ec8328d (patch) | |
| tree | 9c6b2b91098012462430e3d3fe92c9c344d4c36f /src/libsyntax/parse | |
| parent | b496adaefb440cbe01c3896bb1ef5ab1022227bb (diff) | |
| parent | 7d4e7f079552a524440d8b5fb656d52661592aee (diff) | |
| download | rust-a02885e167bcc673208c45b5465dbec78ec8328d.tar.gz rust-a02885e167bcc673208c45b5465dbec78ec8328d.zip | |
rollup merge of #19918: pnkfelix/ast-refactor-make-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')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 5 |
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() |
