diff options
| author | Patrick Walton <[email protected]> | 2011-03-31 18:45:24 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-03-31 18:45:24 -0700 |
| commit | 1eeedbd00865fbc8c2650b8e2feba0b6e7f290dc (patch) | |
| tree | e48d4bf8258c1c27d406031157529013aad37f18 /src/comp/middle/ty.rs | |
| parent | rustc: Use the path index. Speeds up compilation a lot. (diff) | |
| download | rust-1eeedbd00865fbc8c2650b8e2feba0b6e7f290dc.tar.xz rust-1eeedbd00865fbc8c2650b8e2feba0b6e7f290dc.zip | |
rustc: Make tag_ty_params() and substitute_ty_params() take def ids instead of ty_params, and to check in external crates
Diffstat (limited to 'src/comp/middle/ty.rs')
| -rw-r--r-- | src/comp/middle/ty.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index 4e4cf34c..00d4b0b3 100644 --- a/src/comp/middle/ty.rs +++ b/src/comp/middle/ty.rs @@ -1664,15 +1664,15 @@ fn replace_type_params(@t typ, hashmap[ast.def_id,@t] param_map) -> @t { // Substitutes the type parameters specified by @ty_params with the // corresponding types in @bound in the given type. The two vectors must have // the same length. -fn substitute_ty_params(vec[ast.ty_param] ty_params, vec[@t] bound, @t ty) +fn substitute_ty_params(vec[ast.def_id] ty_params, vec[@t] bound, @t ty) -> @t { - auto ty_param_len = _vec.len[ast.ty_param](ty_params); + auto ty_param_len = _vec.len[ast.def_id](ty_params); check (ty_param_len == _vec.len[@t](bound)); auto bindings = common.new_def_hash[@t](); auto i = 0u; while (i < ty_param_len) { - bindings.insert(ty_params.(i).id, bound.(i)); + bindings.insert(ty_params.(i), bound.(i)); i += 1u; } |