File tree 2 files changed +5
-7
lines changed
2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: e066bae56e850b5885cc9b73d44131a27ad68b1d
2
+ refs/heads/master: 05954f37b76e6357fe8c162008176b3477e7b5a8
Original file line number Diff line number Diff line change @@ -1788,24 +1788,22 @@ fn node_id_to_monotype(&ctxt cx, ast::node_id id) -> t {
1788
1788
1789
1789
// Returns the number of distinct type parameters in the given type.
1790
1790
fn count_ty_params( & ctxt cx, t ty) -> uint {
1791
- fn counter( & ctxt cx, @mutable vec [ uint] param_indices, t ty) {
1791
+ fn counter( & ctxt cx, @mutable ( uint[ ] ) param_indices, t ty) {
1792
1792
alt ( struct ( cx, ty) ) {
1793
1793
case ( ty_param( ?param_idx) ) {
1794
1794
auto seen = false;
1795
1795
for ( uint other_param_idx in * param_indices) {
1796
1796
if ( param_idx == other_param_idx) { seen = true; }
1797
1797
}
1798
- if ( !seen) { * param_indices += [ param_idx] ; }
1798
+ if ( !seen) { * param_indices += ~ [ param_idx] ; }
1799
1799
}
1800
1800
case ( _) { /* fall through * / }
1801
1801
}
1802
1802
}
1803
- let vec[ uint] v = [ ] ; // FIXME: typechecker botch
1804
-
1805
- let @mutable vec[ uint] param_indices = @mutable v;
1803
+ let @mutable ( uint[ ] ) param_indices = @mutable ~[ ] ;
1806
1804
auto f = bind counter( cx, param_indices, _) ;
1807
1805
walk_ty( cx, f, ty) ;
1808
- ret vec :: len[ uint] ( * param_indices) ;
1806
+ ret ivec :: len[ uint] ( * param_indices) ;
1809
1807
}
1810
1808
1811
1809
fn type_contains_vars( & ctxt cx, & t typ) -> bool {
You can’t perform that action at this time.
0 commit comments