@@ -347,7 +347,7 @@ fn ast_ty_to_ty(&ty::ctxt tcx, &ty_getter getter, &@ast::ty ast_ty) -> ty::t {
347
347
348
348
auto out_constrs = ~[ ] ;
349
349
for ( @ast:: constr constr in constrs) {
350
- out_constrs += ~[ ast_constr_to_constr( tcx, constr) ] ;
350
+ out_constrs += ~[ ty :: ast_constr_to_constr( tcx, constr) ] ;
351
351
}
352
352
typ = ty:: mk_fn( tcx, proto, i, out_ty, cf, out_constrs) ;
353
353
}
@@ -383,7 +383,7 @@ fn ast_ty_to_ty(&ty::ctxt tcx, &ty_getter getter, &@ast::ty ast_ty) -> ty::t {
383
383
384
384
auto out_constrs = ~[ ] ;
385
385
for ( @ast:: constr constr in m. node. constrs) {
386
- out_constrs += ~[ ast_constr_to_constr( tcx, constr) ] ;
386
+ out_constrs += ~[ ty :: ast_constr_to_constr( tcx, constr) ] ;
387
387
}
388
388
let ty:: method new_m =
389
389
rec( proto=m. node. proto,
@@ -399,7 +399,7 @@ fn ast_ty_to_ty(&ty::ctxt tcx, &ty_getter getter, &@ast::ty ast_ty) -> ty::t {
399
399
case ( ast:: ty_constr( ?t, ?cs) ) {
400
400
auto out_cs = ~[ ] ;
401
401
for ( @ast:: ty_constr constr in cs) {
402
- out_cs += ~[ ast_constr_to_constr( tcx, constr) ] ;
402
+ out_cs += ~[ ty :: ast_constr_to_constr( tcx, constr) ] ;
403
403
}
404
404
typ = ty:: mk_constr( tcx, ast_ty_to_ty( tcx, getter, t) , out_cs) ;
405
405
}
@@ -509,7 +509,7 @@ mod collect {
509
509
510
510
auto out_constrs = ~[ ] ;
511
511
for ( @ast:: constr constr in decl. constraints) {
512
- out_constrs += ~[ ast_constr_to_constr ( cx. tcx , constr) ] ;
512
+ out_constrs += ~[ ty :: ast_constr_to_constr ( cx. tcx , constr) ] ;
513
513
}
514
514
auto t_fn =
515
515
ty:: mk_fn ( cx. tcx , proto, input_tys, output_ty, decl. cf ,
@@ -589,7 +589,7 @@ mod collect {
589
589
590
590
auto out_constrs = ~[ ] ;
591
591
for ( @ast:: constr constr in m. node. meth. decl. constraints) {
592
- out_constrs += ~[ ast_constr_to_constr ( cx. tcx , constr) ] ;
592
+ out_constrs += ~[ ty :: ast_constr_to_constr ( cx. tcx , constr) ] ;
593
593
}
594
594
ret rec( proto=m. node . meth . proto , ident=m. node . ident ,
595
595
inputs=inputs, output=output, cf=m. node . meth . decl . cf ,
@@ -2422,7 +2422,8 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) {
2422
2422
2423
2423
auto out_constrs = ~[ ] ;
2424
2424
for ( @ast:: constr constr in m. node. meth. decl. constraints) {
2425
- out_constrs += ~[ ast_constr_to_constr( ccx. tcx, constr) ] ;
2425
+ out_constrs +=
2426
+ ~[ ty:: ast_constr_to_constr( ccx. tcx, constr) ] ;
2426
2427
}
2427
2428
2428
2429
ret rec( proto=m. node. meth. proto, ident=m. node. ident,
@@ -2535,22 +2536,6 @@ fn get_obj_info(&@crate_ctxt ccx) -> option::t[obj_info] {
2535
2536
ret ivec:: last[ obj_info] ( ccx. obj_infos ) ;
2536
2537
}
2537
2538
2538
- fn ast_constr_to_constr[ T ] ( ty:: ctxt tcx, & @ast:: constr_general[ T ] c)
2539
- -> @ty:: constr_general[ T ] {
2540
- alt ( tcx. def_map . find ( c. node . id ) ) {
2541
- case ( some ( ast:: def_fn ( ?pred_id, ast:: pure_fn) ) ) {
2542
- ret @respan ( c. span , rec ( path=c. node . path , args=c. node . args ,
2543
- id=pred_id) ) ;
2544
- }
2545
- case ( _) {
2546
- tcx. sess . span_fatal ( c. span , "Predicate "
2547
- + path_to_str ( c. node . path )
2548
- + " is unbound or bound to a non-function or an \
2549
- impure function") ;
2550
- }
2551
- }
2552
- }
2553
-
2554
2539
fn check_decl_initializer ( & @fn_ctxt fcx , ast:: node_id nid,
2555
2540
& ast:: initializer init) {
2556
2541
check_expr ( fcx, init. expr ) ;
0 commit comments