Skip to content

Commit 659cfab

Browse files
committed
---
yaml --- r: 4047 b: refs/heads/master c: 8ebd292 h: refs/heads/master i: 4045: 6b5316a 4043: 1d73010 4039: dd28794 4031: d9f6ed9 v: v3
1 parent 54b20ff commit 659cfab

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 55acc737a88f3084f68bac55b681a4016292e5b1
2+
refs/heads/master: 8ebd29225379d8ab2229f411a16eae880c887b9b

trunk/src/comp/middle/trans.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -6252,12 +6252,8 @@ fn trans_anon_obj(@block_ctxt bcx, &span sp, &ast::anon_obj anon_obj,
62526252

62536253
// create_vtbl() wants an ast::_obj and all we have is an ast::anon_obj,
62546254
// so we need to roll our own.
6255-
fn anon_obj_field_to_obj_field(&ast::anon_obj_field f)
6256-
-> ast::obj_field {
6257-
ret rec(mut=f.mut, ty=f.ty, ident=f.ident, id=f.id);
6258-
}
62596255
let ast::_obj wrapper_obj = rec(
6260-
fields = std::ivec::map(anon_obj_field_to_obj_field,
6256+
fields = std::ivec::map(ast::obj_field_from_anon_obj_field,
62616257
additional_fields),
62626258
methods = anon_obj.methods,
62636259
dtor = none[@ast::method]);

trunk/src/comp/middle/typeck.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -2481,12 +2481,9 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) {
24812481
}
24822482
}
24832483

2484-
fn ao_field_to_o_field(&ast::anon_obj_field f)
2485-
-> ast::obj_field {
2486-
ret rec(mut=f.mut, ty=f.ty, ident=f.ident, id=f.id);
2487-
}
24882484
fcx.ccx.obj_infos +=
2489-
~[anon_obj(ivec::map(ao_field_to_o_field, fields),
2485+
~[anon_obj(ivec::map(ast::obj_field_from_anon_obj_field,
2486+
fields),
24902487
with_obj_sty)];
24912488

24922489
methods += with_obj_methods;

trunk/src/comp/syntax/ast.rs

+5
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,11 @@ fn block_from_expr(@expr e) -> block {
664664
ret rec(node=blk_, span=e.span);
665665
}
666666

667+
668+
fn obj_field_from_anon_obj_field(&anon_obj_field f) -> obj_field {
669+
ret rec(mut=f.mut, ty=f.ty, ident=f.ident, id=f.id);
670+
}
671+
667672
// This is a convenience function to transfor ternary expressions to if
668673
// expressions so that they can be treated the same
669674
fn ternary_to_if(&@expr e) -> @ast::expr {

0 commit comments

Comments
 (0)