diff options
| author | Patrick Walton <[email protected]> | 2010-10-26 15:36:33 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-10-26 15:37:49 -0700 |
| commit | 3d0da7545588e22c734c21d1bf81d610a3d3f3cc (patch) | |
| tree | c812523d116364e4150b9f4b3cb8cbe4637cb528 /src | |
| parent | rustboot: Use a less hacky method to report tag names in error messages, whic... (diff) | |
| download | rust-3d0da7545588e22c734c21d1bf81d610a3d3f3cc.tar.xz rust-3d0da7545588e22c734c21d1bf81d610a3d3f3cc.zip | |
rustboot: For error reporting, map tag IDs to *tag* names, not to tag *variant* names
Diffstat (limited to 'src')
| -rw-r--r-- | src/boot/me/resolve.ml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/boot/me/resolve.ml b/src/boot/me/resolve.ml index afc329d8..be76bd30 100644 --- a/src/boot/me/resolve.ml +++ b/src/boot/me/resolve.ml @@ -178,10 +178,11 @@ let all_item_collecting_visitor note_header i.id f.Ast.fn_input_slots; | Ast.MOD_ITEM_obj ob -> note_header i.id ob.Ast.obj_state; - | Ast.MOD_ITEM_tag (hdr, oid, _) -> - note_header i.id hdr; - Hashtbl.replace cx.ctxt_user_tag_names oid - (path_to_name cx.ctxt_curr_path); + | Ast.MOD_ITEM_tag (hdr, _, _) -> + note_header i.id hdr + | Ast.MOD_ITEM_type (_, Ast.TY_tag ttag) -> + Hashtbl.replace cx.ctxt_user_tag_names ttag.Ast.tag_id + (path_to_name cx.ctxt_curr_path) | _ -> () end; inner.Walk.visit_mod_item_pre n p i |