@@ -2761,13 +2761,16 @@ fn type_err_to_str(&ty::type_err err) -> str {
2761
2761
// Converts type parameters in a type to type variables and returns the
2762
2762
// resulting type along with a list of type variable IDs.
2763
2763
fn bind_params_in_type( & span sp, & ctxt cx, fn ( ) -> int next_ty_var, t typ,
2764
- uint ty_param_count) -> tup( vec [ int] , t) {
2765
- let vec [ int] param_var_ids = [ ] ;
2764
+ uint ty_param_count) -> tup( int[ ] , t) {
2765
+ let @mutable int[ ] param_var_ids = @mutable ~ [ ] ;
2766
2766
auto i = 0 u;
2767
- while ( i < ty_param_count) { param_var_ids += [ next_ty_var( ) ] ; i += 1 u; }
2768
- fn binder( span sp, ctxt cx, vec[ int] param_var_ids,
2767
+ while ( i < ty_param_count) {
2768
+ * param_var_ids += ~[ next_ty_var( ) ] ;
2769
+ i += 1 u;
2770
+ }
2771
+ fn binder( span sp, ctxt cx, @mutable int[ ] param_var_ids,
2769
2772
fn ( ) -> int next_ty_var, uint index) -> t {
2770
- if ( index < vec :: len( param_var_ids) ) {
2773
+ if ( index < ivec :: len( * param_var_ids) ) {
2771
2774
ret mk_var( cx, param_var_ids. ( index) ) ;
2772
2775
}
2773
2776
else {
@@ -2777,7 +2780,7 @@ fn bind_params_in_type(&span sp, &ctxt cx, fn() -> int next_ty_var, t typ,
2777
2780
auto new_typ =
2778
2781
fold_ty( cx, fm_param( bind binder( sp, cx, param_var_ids,
2779
2782
next_ty_var, _) ) , typ) ;
2780
- ret tup( param_var_ids, new_typ) ;
2783
+ ret tup( * param_var_ids, new_typ) ;
2781
2784
}
2782
2785
2783
2786
0 commit comments