Skip to content

Commit 3d0da75

Browse files
committed
rustboot: For error reporting, map tag IDs to *tag* names, not to tag *variant* names
1 parent 7e3c662 commit 3d0da75

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/boot/me/resolve.ml

+5-4
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,11 @@ let all_item_collecting_visitor
178178
note_header i.id f.Ast.fn_input_slots;
179179
| Ast.MOD_ITEM_obj ob ->
180180
note_header i.id ob.Ast.obj_state;
181-
| Ast.MOD_ITEM_tag (hdr, oid, _) ->
182-
note_header i.id hdr;
183-
Hashtbl.replace cx.ctxt_user_tag_names oid
184-
(path_to_name cx.ctxt_curr_path);
181+
| Ast.MOD_ITEM_tag (hdr, _, _) ->
182+
note_header i.id hdr
183+
| Ast.MOD_ITEM_type (_, Ast.TY_tag ttag) ->
184+
Hashtbl.replace cx.ctxt_user_tag_names ttag.Ast.tag_id
185+
(path_to_name cx.ctxt_curr_path)
185186
| _ -> ()
186187
end;
187188
inner.Walk.visit_mod_item_pre n p i

0 commit comments

Comments
 (0)