aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me/resolve.ml
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-10-13 17:15:25 -0700
committerGraydon Hoare <[email protected]>2010-10-13 17:15:25 -0700
commit668f3a90a85edc8d4e1472af0eb530fa7c4bb2ed (patch)
treea706955634a5a3036ebe79ba8ef0af31a1293ef6 /src/boot/me/resolve.ml
parentFetch typarams from the outermost item frame, when inside an iter-block. One ... (diff)
downloadrust-668f3a90a85edc8d4e1472af0eb530fa7c4bb2ed.tar.xz
rust-668f3a90a85edc8d4e1472af0eb530fa7c4bb2ed.zip
Move the friendly-names table to semant, reuse it in the name mangler.
Diffstat (limited to 'src/boot/me/resolve.ml')
-rw-r--r--src/boot/me/resolve.ml12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/boot/me/resolve.ml b/src/boot/me/resolve.ml
index 78d372d5..8372b64a 100644
--- a/src/boot/me/resolve.ml
+++ b/src/boot/me/resolve.ml
@@ -877,6 +877,18 @@ let process_crate
(* Post-resolve, we can establish a tag cache. *)
cx.ctxt_tag_cache <- Some (Hashtbl.create 0);
cx.ctxt_rebuild_cache <- Some (Hashtbl.create 0);
+
+ (* Also index all the type names for future error messages. *)
+ Hashtbl.iter
+ begin
+ fun item_id ty ->
+ let item_names = cx.Semant.ctxt_all_item_names in
+ if Hashtbl.mem item_names item_id then
+ Hashtbl.add cx.Semant.ctxt_user_type_names ty
+ (Hashtbl.find item_names item_id)
+ end
+ cx.Semant.ctxt_all_type_items;
+
;;
(*