Skip to content

Commit

Permalink
Fix bug: metadata for struct constructor function needs to encode info
Browse files Browse the repository at this point in the history
on its generic type parameters.

Test case to follow.
  • Loading branch information
pnkfelix committed Jan 27, 2014
1 parent d6d7812 commit 965387a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librustc/metadata/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,8 @@ fn encode_info_for_struct_ctor(ecx: &EncodeContext,
ebml_w.start_tag(tag_items_data_item);
encode_def_id(ebml_w, local_def(ctor_id));
encode_family(ebml_w, 'f');
encode_bounds_and_type(ebml_w, ecx,
&lookup_item_type(ecx.tcx, local_def(ctor_id)));
encode_name(ecx, ebml_w, name);
encode_type(ecx, ebml_w, node_id_to_type(ecx.tcx, ctor_id));
encode_path(ecx, ebml_w, path, ast_map::PathName(name));
Expand Down

0 comments on commit 965387a

Please sign in to comment.