@@ -120,7 +120,7 @@ type local_ctxt = rec(vec[str] path,
120
120
vec[ ast. ty_param] obj_typarams ,
121
121
vec[ ast. obj_field] obj_fields ,
122
122
@crate_ctxt ccx ) ;
123
-
123
+
124
124
125
125
type self_vt = rec ( ValueRef v, ty . t t) ;
126
126
@@ -1565,7 +1565,7 @@ fn get_tydesc(&@block_ctxt cx, ty.t t) -> result {
1565
1565
// Does it contain a type param? If so, generate a derived tydesc.
1566
1566
let uint n_params = ty. count_ty_params( cx. fcx. lcx. ccx. tcx, t) ;
1567
1567
1568
- if ( ty . count_ty_params ( cx . fcx . lcx . ccx . tcx , t ) > 0 u) {
1568
+ if ( n_params > 0 u) {
1569
1569
auto tys = linearize_ty_params( cx, t) ;
1570
1570
1571
1571
check ( n_params == _vec. len[ uint] ( tys. _0) ) ;
@@ -4312,7 +4312,8 @@ fn trans_bind_thunk(@local_ctxt cx,
4312
4312
4313
4313
if ( out_arg. mode == ast. val) {
4314
4314
val = bcx. build. Load ( val) ;
4315
- } else if ( ty. count_ty_params( cx. ccx. tcx, out_arg. ty) > 0 u) {
4315
+ } else if ( ty. type_contains_params( cx. ccx. tcx,
4316
+ out_arg. ty) ) {
4316
4317
check ( out_arg. mode == ast. alias) ;
4317
4318
val = bcx. build. PointerCast ( val, llout_arg_ty) ;
4318
4319
}
@@ -4325,7 +4326,7 @@ fn trans_bind_thunk(@local_ctxt cx,
4325
4326
case ( none[ @ast. expr] ) {
4326
4327
let ValueRef passed_arg = llvm. LLVMGetParam ( llthunk, a) ;
4327
4328
4328
- if ( ty. count_ty_params ( cx. ccx. tcx, out_arg. ty) > 0 u ) {
4329
+ if ( ty. type_contains_params ( cx. ccx. tcx, out_arg. ty) ) {
4329
4330
check ( out_arg. mode == ast. alias) ;
4330
4331
passed_arg = bcx. build. PointerCast ( passed_arg,
4331
4332
llout_arg_ty) ;
@@ -4593,7 +4594,7 @@ fn trans_arg_expr(@block_ctxt cx,
4593
4594
bcx = re. bcx;
4594
4595
}
4595
4596
4596
- if ( ty. count_ty_params ( cx. fcx. lcx. ccx. tcx, arg. ty) > 0 u ) {
4597
+ if ( ty. type_contains_params ( cx. fcx. lcx. ccx. tcx, arg. ty) ) {
4597
4598
auto lldestty = lldestty0;
4598
4599
if ( arg. mode == ast. val) {
4599
4600
// FIXME: we'd prefer to use &&, but rustboot doesn't like it
@@ -4655,7 +4656,7 @@ fn trans_args(@block_ctxt cx,
4655
4656
if ( ty. type_has_dynamic_size( cx. fcx. lcx. ccx. tcx, retty) ) {
4656
4657
llargs += vec( bcx. build. PointerCast
4657
4658
( llretslot, T_typaram_ptr ( cx. fcx. lcx. ccx. tn) ) ) ;
4658
- } else if ( ty. count_ty_params ( cx. fcx. lcx. ccx. tcx, retty) != 0 u ) {
4659
+ } else if ( ty. type_contains_params ( cx. fcx. lcx. ccx. tcx, retty) ) {
4659
4660
// It's possible that the callee has some generic-ness somewhere in
4660
4661
// its return value -- say a method signature within an obj or a fn
4661
4662
// type deep in a structure -- which the caller has a concrete view
0 commit comments