Skip to content

Commit 33fbbab

Browse files
lkupergraydon
authored andcommitted
---
yaml --- r: 2532 b: refs/heads/master c: 5679f5c h: refs/heads/master v: v3
1 parent a88f5ab commit 33fbbab

File tree

4 files changed

+16
-19
lines changed

4 files changed

+16
-19
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: cd31d5d532819d64772d0453fd1c2a3135b35f6c
2+
refs/heads/master: 5679f5c55e15e4a42542c36b1abc86b469903d19

trunk/src/comp/front/parser.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -801,15 +801,11 @@ fn parse_bottom_expr(parser p) -> @ast::expr {
801801
expect(p, token::LBRACE);
802802

803803
while (p.peek() != token::RBRACE) {
804-
alt (p.peek()) {
805-
case (token::WITH) {
806-
p.bump();
807-
with_obj = some[ast::ident](parse_ident(p));
808-
}
809-
case (_) {
810-
_vec::push[@ast::method](meths,
811-
parse_method(p));
812-
}
804+
if (eat_word(p, "with")) {
805+
with_obj = some[ast::ident](parse_ident(p));
806+
} else {
807+
_vec::push[@ast::method](meths,
808+
parse_method(p));
813809
}
814810
}
815811

trunk/src/comp/middle/typeck.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ mod Collect {
762762
}
763763
}
764764
}
765-
765+
766766
// Anonymous objects are expressions, not items, but they're enough like
767767
// items that we're going to include them in this fold.
768768
fn fold_expr_anon_obj(&@env e, &span sp,
@@ -1544,8 +1544,8 @@ mod Pushdown {
15441544
write_type_only(fcx.ccx.node_types, ast::ann_tag(ann), t);
15451545
}
15461546
/* FIXME: should this check the type annotations? */
1547-
case (ast::expr_fail(_)) { e_1 = e.node; }
1548-
case (ast::expr_log(_,_,_)) { e_1 = e.node; }
1547+
case (ast::expr_fail(_)) { e_1 = e.node; }
1548+
case (ast::expr_log(_,_,_)) { e_1 = e.node; }
15491549
case (ast::expr_break(_)) { e_1 = e.node; }
15501550
case (ast::expr_cont(_)) { e_1 = e.node; }
15511551
case (ast::expr_ret(_,_)) { e_1 = e.node; }
@@ -2262,7 +2262,7 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) -> @ast::expr {
22622262
+ "slot variables or literals");
22632263
}
22642264
}
2265-
2265+
22662266
require_pure_function(fcx.ccx, d_id, expr.span);
22672267

22682268
ret @fold::respan[ast::expr_]
@@ -2574,7 +2574,7 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) -> @ast::expr {
25742574
case (ast::expr_call(?f, ?args, ?a)) {
25752575
/* here we're kind of hosed, as f can be any expr
25762576
need to restrict it to being an explicit expr_path if we're
2577-
inside a pure function, and need an environment mapping from
2577+
inside a pure function, and need an environment mapping from
25782578
function name onto purity-designation */
25792579
require_pure_call(fcx.ccx, fcx.purity, f, expr.span);
25802580

@@ -2613,10 +2613,10 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) -> @ast::expr {
26132613
}
26142614
// Otherwise, we should be able to look up the object we're
26152615
// "with".
2616-
case (_) {
2616+
case (_) {
26172617
// TODO.
2618-
2619-
fail;
2618+
2619+
fail;
26202620
}
26212621
}
26222622

@@ -2886,7 +2886,7 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) -> @ast::expr {
28862886
expr_ty(fcx.ccx.tcx, fcx.ccx.node_types, base_1));
28872887

28882888
auto idx_1 = check_expr(fcx, idx);
2889-
auto idx_t = expr_ty(fcx.ccx.tcx, fcx.ccx.node_types, idx_1);
2889+
auto idx_t = expr_ty(fcx.ccx.tcx, fcx.ccx.node_types, idx_1);
28902890
alt (struct(fcx.ccx.tcx, base_t)) {
28912891
case (ty::ty_vec(?mt)) {
28922892
if (! type_is_integral(fcx.ccx.tcx, idx_t)) {

trunk/src/test/run-pass/method-overriding.rs renamed to trunk/src/test/run-pass/anon-objs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// xfail-boot
22
// xfail-stage0
3+
// xfail-stage1
34
use std;
45

56
fn main() {

0 commit comments

Comments
 (0)