Skip to content

Commit 965387a

Browse files
committed
Fix bug: metadata for struct constructor function needs to encode info
on its generic type parameters. Test case to follow.
1 parent d6d7812 commit 965387a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc/metadata/encoder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,8 @@ fn encode_info_for_struct_ctor(ecx: &EncodeContext,
766766
ebml_w.start_tag(tag_items_data_item);
767767
encode_def_id(ebml_w, local_def(ctor_id));
768768
encode_family(ebml_w, 'f');
769+
encode_bounds_and_type(ebml_w, ecx,
770+
&lookup_item_type(ecx.tcx, local_def(ctor_id)));
769771
encode_name(ecx, ebml_w, name);
770772
encode_type(ecx, ebml_w, node_id_to_type(ecx.tcx, ctor_id));
771773
encode_path(ecx, ebml_w, path, ast_map::PathName(name));

0 commit comments

Comments
 (0)