@@ -138,7 +138,7 @@ fn resolve_crate(session sess, &ast_map::map amap, @ast::crate crate) ->
138
138
auto e =
139
139
@rec ( crate_map=new_int_hash[ ast:: crate_num] ( ) ,
140
140
def_map=new_int_hash[ def] ( ) ,
141
- fn_constrs = new_int_hash[ vec [ ty:: constr_def] ] ( ) ,
141
+ fn_constrs = new_int_hash[ ty:: constr_def[ ] ] ( ) ,
142
142
ast_map=amap,
143
143
imports=new_int_hash[ import_state] ( ) ,
144
144
mod_map=new_int_hash[ @indexed_mod] ( ) ,
@@ -416,8 +416,14 @@ fn resolve_constr(@env e, node_id id, &@ast::constr c, &scopes sc,
416
416
if ( option:: is_some ( new_def) ) {
417
417
alt ( option:: get ( new_def) ) {
418
418
case ( ast:: def_fn ( ?pred_id, ast:: pure_fn) ) {
419
+ // FIXME: Remove this vec->ivec conversion.
420
+ let ( @ast:: constr_arg_general[ uint] ) [ ] cag_ivec = ~[ ] ;
421
+ for ( @ast:: constr_arg_general[ uint] cag in c. node. args) {
422
+ cag_ivec += ~[ cag] ;
423
+ }
424
+
419
425
let ty:: constr_general[ uint] c_ =
420
- rec ( path=c. node . path , args=c . node . args , id=pred_id) ;
426
+ rec ( path=c. node . path , args=cag_ivec , id=pred_id) ;
421
427
let ty:: constr_def new_constr = respan ( c. span , c_) ;
422
428
add_constr ( e, id, new_constr) ;
423
429
}
@@ -433,8 +439,8 @@ fn resolve_constr(@env e, node_id id, &@ast::constr c, &scopes sc,
433
439
fn add_constr ( & @env e , node_id id, & ty:: constr_def c) {
434
440
e. fn_constrs . insert ( id,
435
441
alt ( e. fn_constrs . find ( id) ) {
436
- case ( none) { [ c] }
437
- case ( some ( ?cs) ) { cs + [ c] }
442
+ case ( none) { ~ [ c] }
443
+ case ( some ( ?cs) ) { cs + ~ [ c] }
438
444
} ) ;
439
445
}
440
446
0 commit comments