@@ -881,6 +881,7 @@ fn encode_info_for_item(ecx: @EncodeContext, ebml_w: writer::Encoder,
881
881
encode_family(ebml_w, purity_fn_family(mty.fty.purity));
882
882
encode_self_type(ebml_w, mty.self_ty);
883
883
encode_method_sort(ebml_w, 'r');
884
+ encode_visibility(ebml_w, ast::public);
884
885
ebml_w.end_tag();
885
886
}
886
887
provided(m) => {
@@ -896,6 +897,7 @@ fn encode_info_for_item(ecx: @EncodeContext, ebml_w: writer::Encoder,
896
897
encode_family(ebml_w, purity_fn_family(mty.fty.purity));
897
898
encode_self_type(ebml_w, mty.self_ty);
898
899
encode_method_sort(ebml_w, 'p');
900
+ encode_visibility(ebml_w, m.vis);
899
901
ebml_w.end_tag();
900
902
}
901
903
}
@@ -930,6 +932,11 @@ fn encode_info_for_item(ecx: @EncodeContext, ebml_w: writer::Encoder,
930
932
let mut m_path = vec::append(~[], path); // :-(
931
933
m_path += [ast_map::path_name(item.ident)];
932
934
encode_path(ecx, ebml_w, m_path, ast_map::path_name(ty_m.ident));
935
+
936
+ // For now, use the item visibility until trait methods can have
937
+ // real visibility in the AST.
938
+ encode_visibility(ebml_w, item.vis);
939
+
933
940
ebml_w.end_tag();
934
941
}
935
942
@@ -1018,7 +1025,7 @@ fn encode_info_for_items(ecx: @EncodeContext, ebml_w: writer::Encoder,
1018
1025
|ni, cx, v| {
1019
1026
visit::visit_foreign_item(ni, cx, v);
1020
1027
match ecx.tcx.items.get(&ni.id) {
1021
- ast_map::node_foreign_item(_, abi, pt) => {
1028
+ ast_map::node_foreign_item(_, abi, _, pt) => {
1022
1029
encode_info_for_foreign_item(ecx, ebml_w, ni,
1023
1030
index, /*bad*/copy *pt,
1024
1031
abi);
0 commit comments