Skip to content

Commit b393476

Browse files
committed
---
yaml --- r: 3643 b: refs/heads/master c: 05954f3 h: refs/heads/master i: 3641: d9941c8 3639: 19ec702 v: v3
1 parent 7f30d0d commit b393476

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: e066bae56e850b5885cc9b73d44131a27ad68b1d
2+
refs/heads/master: 05954f37b76e6357fe8c162008176b3477e7b5a8

trunk/src/comp/middle/ty.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -1788,24 +1788,22 @@ fn node_id_to_monotype(&ctxt cx, ast::node_id id) -> t {
17881788

17891789
// Returns the number of distinct type parameters in the given type.
17901790
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) {
17921792
alt (struct(cx, ty)) {
17931793
case (ty_param(?param_idx)) {
17941794
auto seen = false;
17951795
for (uint other_param_idx in *param_indices) {
17961796
if (param_idx == other_param_idx) { seen = true; }
17971797
}
1798-
if (!seen) { *param_indices += [param_idx]; }
1798+
if (!seen) { *param_indices += ~[param_idx]; }
17991799
}
18001800
case (_) {/* fall through */ }
18011801
}
18021802
}
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 ~[];
18061804
auto f = bind counter(cx, param_indices, _);
18071805
walk_ty(cx, f, ty);
1808-
ret vec::len[uint](*param_indices);
1806+
ret ivec::len[uint](*param_indices);
18091807
}
18101808

18111809
fn type_contains_vars(&ctxt cx, &t typ) -> bool {

0 commit comments

Comments
 (0)