From 1eeedbd00865fbc8c2650b8e2feba0b6e7f290dc Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 31 Mar 2011 18:45:24 -0700 Subject: rustc: Make tag_ty_params() and substitute_ty_params() take def ids instead of ty_params, and to check in external crates --- src/comp/middle/ty.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/comp/middle/ty.rs') 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; } -- cgit v1.2.3