@@ -896,6 +896,7 @@ fn encode_info_for_item(ecx: @EncodeContext, ebml_w: writer::Encoder,
896
896
encode_family(ebml_w, purity_fn_family(mty.fty.purity));
897
897
encode_self_type(ebml_w, mty.self_ty);
898
898
encode_method_sort(ebml_w, 'r');
899
+ encode_visibility(ebml_w, ast::public);
899
900
ebml_w.end_tag();
900
901
}
901
902
provided(m) => {
@@ -911,6 +912,7 @@ fn encode_info_for_item(ecx: @EncodeContext, ebml_w: writer::Encoder,
911
912
encode_family(ebml_w, purity_fn_family(mty.fty.purity));
912
913
encode_self_type(ebml_w, mty.self_ty);
913
914
encode_method_sort(ebml_w, 'p');
915
+ encode_visibility(ebml_w, m.vis);
914
916
ebml_w.end_tag();
915
917
}
916
918
}
@@ -945,6 +947,11 @@ fn encode_info_for_item(ecx: @EncodeContext, ebml_w: writer::Encoder,
945
947
let mut m_path = vec::append(~[], path); // :-(
946
948
m_path += [ast_map::path_name(item.ident)];
947
949
encode_path(ecx, ebml_w, m_path, ast_map::path_name(ty_m.ident));
950
+
951
+ // For now, use the item visibility until trait methods can have
952
+ // real visibility in the AST.
953
+ encode_visibility(ebml_w, item.vis);
954
+
948
955
ebml_w.end_tag();
949
956
}
950
957
@@ -1033,7 +1040,7 @@ fn encode_info_for_items(ecx: @EncodeContext, ebml_w: writer::Encoder,
1033
1040
|ni, cx, v| {
1034
1041
visit::visit_foreign_item(ni, cx, v);
1035
1042
match ecx.tcx.items.get(&ni.id) {
1036
- ast_map::node_foreign_item(_, abi, pt) => {
1043
+ ast_map::node_foreign_item(_, abi, _, pt) => {
1037
1044
encode_info_for_foreign_item(ecx, ebml_w, ni,
1038
1045
index, /*bad*/copy *pt,
1039
1046
abi);
0 commit comments