@@ -68,7 +68,7 @@ type fn_ctxt =
68
68
69
69
70
70
// Used for ast_ty_to_ty() below.
71
- type ty_getter = fn ( & ast:: def_id) -> ty:: ty_param_count_and_ty ;
71
+ type ty_getter = fn ( & ast:: def_id) -> ty:: ty_param_count_and_ty;
72
72
73
73
fn lookup_local( & @fn_ctxt fcx, & span sp, ast:: node_id id) -> int {
74
74
alt ( fcx. locals. find( id) ) {
@@ -1164,6 +1164,7 @@ type gather_result =
1164
1164
hashmap[ ast:: node_id, ast:: ident] local_names,
1165
1165
int next_var_id) ;
1166
1166
1167
+ // Used only as a helper for check_fn.
1167
1168
fn gather_locals( & @crate_ctxt ccx, & ast:: _fn f,
1168
1169
& ast:: node_id id) -> gather_result {
1169
1170
fn next_var_id( @mutable int nvi) -> int {
@@ -1191,8 +1192,8 @@ fn gather_locals(&@crate_ctxt ccx, &ast::_fn f,
1191
1192
auto locals = new_int_hash[ int] ( ) ;
1192
1193
auto local_names = new_int_hash[ ast:: ident] ( ) ;
1193
1194
auto nvi = @mutable 0 ;
1194
- // Add object fields, if any.
1195
1195
1196
+ // Add object fields, if any.
1196
1197
alt ( get_obj_info( ccx) ) {
1197
1198
case ( option:: some( ?oinfo) ) {
1198
1199
for ( ast:: obj_field f in oinfo. obj_fields) {
@@ -1204,7 +1205,6 @@ fn gather_locals(&@crate_ctxt ccx, &ast::_fn f,
1204
1205
case ( option:: none) { /* no fields * / }
1205
1206
}
1206
1207
// Add formal parameters.
1207
-
1208
1208
auto args = ty:: ty_fn_args( ccx. tcx, ty:: node_id_to_type( ccx. tcx, id) ) ;
1209
1209
auto i = 0 u;
1210
1210
for ( ty:: arg arg in args) {
@@ -2113,8 +2113,8 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) {
2113
2113
context") ;
2114
2114
}
2115
2115
}
2116
- // Grab this method's type out of the current object type.
2117
2116
2117
+ // Grab this method's type out of the current object type.
2118
2118
alt ( structure_of( fcx, expr. span, this_obj_ty) ) {
2119
2119
case ( ty:: ty_obj( ?methods) ) {
2120
2120
for ( ty:: method method in methods) {
@@ -2268,7 +2268,6 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) {
2268
2268
write:: ty_only_fixup( fcx, id, fields. ( ix) . mt. ty) ;
2269
2269
}
2270
2270
case ( ty:: ty_obj( ?methods) ) {
2271
- // log_err "checking method_idx 1...";
2272
2271
let uint ix =
2273
2272
ty:: method_idx( fcx. ccx. tcx. sess, expr. span, field,
2274
2273
methods) ;
@@ -2458,14 +2457,14 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) {
2458
2457
method_types. ( i) ) ) ;
2459
2458
i += 1 u;
2460
2459
}
2461
- // Typecheck the methods.
2462
2460
2461
+ // Typecheck the methods.
2463
2462
for ( @ast:: method method in anon_obj. methods) {
2464
2463
check_method ( fcx. ccx , method) ;
2465
2464
}
2466
2465
next_ty_var ( fcx) ;
2467
- // Now remove the info from the stack.
2468
2466
2467
+ // Now remove the info from the stack.
2469
2468
ivec:: pop[ obj_info] ( fcx. ccx . obj_infos ) ;
2470
2469
}
2471
2470
case ( _) {
@@ -2658,13 +2657,12 @@ fn check_item(@crate_ctxt ccx, &@ast::item it) {
2658
2657
2659
2658
ccx. obj_infos += ~[ rec ( obj_fields=ob. fields , this_obj=it. id ) ] ;
2660
2659
// Typecheck the methods.
2661
-
2662
2660
for ( @ast:: method method in ob. methods) {
2663
2661
check_method ( ccx, method) ;
2664
2662
}
2665
2663
option:: may[ @ast:: method] ( bind check_method ( ccx, _) , ob. dtor ) ;
2666
- // Now remove the info from the stack.
2667
2664
2665
+ // Now remove the info from the stack.
2668
2666
ivec:: pop[ obj_info] ( ccx. obj_infos ) ;
2669
2667
}
2670
2668
case ( _) { /* nothing to do */ }
0 commit comments