Skip to content

Commit 7743b24

Browse files
brsongraydon
authored andcommitted
---
yaml --- r: 1479 b: refs/heads/master c: c1e6f53 h: refs/heads/master i: 1477: 600a24f 1475: 90eeae0 1471: 916d26d v: v3
1 parent 4ca60c9 commit 7743b24

File tree

6 files changed

+10
-12
lines changed

6 files changed

+10
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 7cef1b3a0f645a3cc420a4ae9583b1fd5463e833
2+
refs/heads/master: c1e6f5328c3f46884ed7a7e29c780e307b02100a

trunk/src/comp/front/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ tag expr_ {
185185
expr_field(@expr, ident, ann);
186186
expr_index(@expr, @expr, ann);
187187
expr_path(path, option.t[def], ann);
188-
expr_ext(path, vec[@expr], option.t[@expr], option.t[@expr], ann);
188+
expr_ext(path, vec[@expr], option.t[@expr], @expr, ann);
189189
expr_fail;
190190
expr_ret(option.t[@expr]);
191191
expr_put(option.t[@expr]);

trunk/src/comp/front/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ impure fn expand_syntax_ext(parser p, ast.span sp,
755755
if (_str.eq(extname, "fmt")) {
756756
auto expanded = extfmt.expand_syntax_ext(args, body);
757757
auto newexpr = ast.expr_ext(path, args, body,
758-
some[@ast.expr](expanded),
758+
expanded,
759759
ast.ann_none);
760760

761761
ret newexpr;

trunk/src/comp/middle/fold.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ type ast_fold[ENV] =
157157
(fn(&ENV e, &span sp,
158158
&path p, vec[@expr] args,
159159
option.t[@expr] body,
160-
option.t[@expr] expanded,
160+
@expr expanded,
161161
ann a) -> @expr) fold_expr_ext,
162162

163163
(fn(&ENV e, &span sp) -> @expr) fold_expr_fail,
@@ -653,10 +653,9 @@ fn fold_expr[ENV](&ENV env, ast_fold[ENV] fld, &@expr e) -> @expr {
653653
case (ast.expr_ext(?p, ?args, ?body, ?expanded, ?t)) {
654654
// Only fold the expanded expression, not the
655655
// expressions involved in syntax extension
656-
auto exp = option.get[@expr](expanded);
657-
auto exp_ = fold_expr(env_, fld, exp);
656+
auto exp = fold_expr(env_, fld, expanded);
658657
ret fld.fold_expr_ext(env_, e.span, p, args, body,
659-
some[@ast.expr](exp_), t);
658+
exp, t);
660659
}
661660

662661
case (ast.expr_fail) {
@@ -1184,7 +1183,7 @@ fn identity_fold_expr_path[ENV](&ENV env, &span sp,
11841183
fn identity_fold_expr_ext[ENV](&ENV env, &span sp,
11851184
&path p, vec[@expr] args,
11861185
option.t[@expr] body,
1187-
option.t[@expr] expanded,
1186+
@expr expanded,
11881187
ann a) -> @expr {
11891188
ret @respan(sp, ast.expr_ext(p, args, body, expanded, a));
11901189
}

trunk/src/comp/middle/trans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3694,7 +3694,7 @@ fn trans_expr(@block_ctxt cx, @ast.expr e) -> result {
36943694
}
36953695

36963696
case (ast.expr_ext(_, _, _, ?expanded, _)) {
3697-
ret trans_expr(cx, option.get[@ast.expr](expanded));
3697+
ret trans_expr(cx, expanded);
36983698
}
36993699

37003700
case (ast.expr_fail) {

trunk/src/comp/middle/typeck.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,11 +1514,10 @@ fn check_expr(&@fn_ctxt fcx, @ast.expr expr) -> @ast.expr {
15141514
}
15151515

15161516
case (ast.expr_ext(?p, ?args, ?body, ?expanded, _)) {
1517-
auto exp_ = check_expr(fcx, option.get[@ast.expr](expanded));
1517+
auto exp_ = check_expr(fcx, expanded);
15181518
auto t = expr_ty(exp_);
15191519
ret @fold.respan[ast.expr_](expr.span,
1520-
ast.expr_ext(p, args, body,
1521-
some[@ast.expr](exp_),
1520+
ast.expr_ext(p, args, body, exp_,
15221521
ast.ann_type(t)));
15231522
}
15241523

0 commit comments

Comments
 (0)