@@ -1542,25 +1542,25 @@ fn eq_ty(&t a, &t b) -> bool { ret a == b; }
1542
1542
1543
1543
// Type lookups
1544
1544
1545
- fn ann_to_ty_param_substs_opt_and_ty ( & ty_ctxt tcx , & ast:: ann ann)
1545
+ fn ann_to_ty_param_substs_opt_and_ty ( & ctxt cx , & ast:: ann ann)
1546
1546
-> ty_param_substs_opt_and_ty {
1547
1547
1548
1548
// Pull out the node type table.
1549
- alt ( { tcx . node_types . ( ann. id ) } ) {
1549
+ alt ( { cx . node_types . ( ann. id ) } ) {
1550
1550
case ( none) {
1551
- tcx . sess . bug ( "ann_to_ty_param_substs_opt_and_ty() called on an " +
1552
- "untyped node" ) ;
1551
+ cx . sess . bug ( "ann_to_ty_param_substs_opt_and_ty() called on an " +
1552
+ "untyped node" ) ;
1553
1553
}
1554
1554
case ( some ( ?tpot) ) { ret tpot; }
1555
1555
}
1556
1556
}
1557
1557
1558
- fn ann_to_type ( & ty_ctxt tcx , & ast:: ann ann) -> t {
1559
- ret ann_to_ty_param_substs_opt_and_ty ( tcx , ann) . _1 ;
1558
+ fn ann_to_type ( & ctxt cx , & ast:: ann ann) -> t {
1559
+ ret ann_to_ty_param_substs_opt_and_ty ( cx , ann) . _1 ;
1560
1560
}
1561
1561
1562
- fn ann_to_type_params ( & ty_ctxt tcx , & ast:: ann ann) -> vec[ t ] {
1563
- alt ( ann_to_ty_param_substs_opt_and_ty ( tcx , ann) . _0 ) {
1562
+ fn ann_to_type_params ( & ctxt cx , & ast:: ann ann) -> vec[ t ] {
1563
+ alt ( ann_to_ty_param_substs_opt_and_ty ( cx , ann) . _0 ) {
1564
1564
case ( none) {
1565
1565
let vec[ t] result = [ ] ;
1566
1566
ret result;
@@ -1569,8 +1569,8 @@ fn ann_to_type_params(&ty_ctxt tcx, &ast::ann ann) -> vec[t] {
1569
1569
}
1570
1570
}
1571
1571
1572
- fn ann_has_type_params ( & ty_ctxt tcx , & ast:: ann ann) -> bool {
1573
- auto tpt = ann_to_ty_param_substs_opt_and_ty ( tcx , ann) ;
1572
+ fn ann_has_type_params ( & ctxt cx , & ast:: ann ann) -> bool {
1573
+ auto tpt = ann_to_ty_param_substs_opt_and_ty ( cx , ann) ;
1574
1574
ret !option:: is_none[ vec[ t] ] ( tpt. _0 ) ;
1575
1575
}
1576
1576
@@ -1765,8 +1765,8 @@ fn expr_ty_params_and_ty(&ctxt cx, &@ast::expr expr)
1765
1765
ann_to_type ( cx, a) ) ;
1766
1766
}
1767
1767
1768
- fn expr_has_ty_params ( & ty_ctxt tcx , & @ast:: expr expr) -> bool {
1769
- ret ann_has_type_params ( tcx , expr_ann ( expr) ) ;
1768
+ fn expr_has_ty_params ( & ctxt cx , & @ast:: expr expr) -> bool {
1769
+ ret ann_has_type_params ( cx , expr_ann ( expr) ) ;
1770
1770
}
1771
1771
1772
1772
fn decl_local_ty ( & ctxt cx, & @ast:: decl d) -> t {
@@ -2886,19 +2886,19 @@ fn lookup_item_type(ctxt cx, ast::def_id did) -> ty_param_count_and_ty {
2886
2886
}
2887
2887
}
2888
2888
2889
- fn ret_ty_of_fn_ty( ty_ctxt tcx , t a_ty) -> t {
2890
- alt ( ty:: struct( tcx , a_ty) ) {
2889
+ fn ret_ty_of_fn_ty( ctxt cx , t a_ty) -> t {
2890
+ alt ( ty:: struct( cx , a_ty) ) {
2891
2891
case ( ty:: ty_fn( _, _, ?ret_ty, _) ) {
2892
2892
ret ret_ty;
2893
2893
}
2894
2894
case ( _) {
2895
- tcx . sess. bug( "ret_ty_of_fn_ty() called on non-function type" ) ;
2895
+ cx . sess. bug( "ret_ty_of_fn_ty() called on non-function type" ) ;
2896
2896
}
2897
2897
}
2898
2898
}
2899
2899
2900
- fn ret_ty_of_fn( ty_ctxt tcx , ast:: ann ann) -> t {
2901
- ret ret_ty_of_fn_ty( tcx , ann_to_type( tcx , ann) ) ;
2900
+ fn ret_ty_of_fn( ctxt cx , ast:: ann ann) -> t {
2901
+ ret ret_ty_of_fn_ty( cx , ann_to_type( cx , ann) ) ;
2902
2902
}
2903
2903
2904
2904
// Local Variables:
0 commit comments