diff options
| author | Graydon Hoare <[email protected]> | 2010-10-13 17:15:25 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-10-13 17:15:25 -0700 |
| commit | 668f3a90a85edc8d4e1472af0eb530fa7c4bb2ed (patch) | |
| tree | a706955634a5a3036ebe79ba8ef0af31a1293ef6 /src/boot/me/resolve.ml | |
| parent | Fetch typarams from the outermost item frame, when inside an iter-block. One ... (diff) | |
| download | rust-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.ml | 12 |
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; + ;; (* |