We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 40e1f7c + fb9b451 commit 97f605eCopy full SHA for 97f605e
src/librustc/metadata/encoder.rs
@@ -1478,6 +1478,9 @@ fn encode_info_for_foreign_item(ecx: &EncodeContext,
1478
if abi == abi::RustIntrinsic {
1479
encode_inlined_item(ecx, rbml_w, IIForeignRef(nitem));
1480
}
1481
+ encode_attributes(rbml_w, &*nitem.attrs);
1482
+ let stab = stability::lookup(ecx.tcx, ast_util::local_def(nitem.id));
1483
+ encode_stability(rbml_w, stab);
1484
encode_symbol(ecx, rbml_w, nitem.id);
1485
1486
ast::ForeignItemStatic(_, mutbl) => {
@@ -1488,6 +1491,9 @@ fn encode_info_for_foreign_item(ecx: &EncodeContext,
1488
1491
1489
1492
encode_bounds_and_type(rbml_w, ecx,
1490
1493
&lookup_item_type(ecx.tcx,local_def(nitem.id)));
1494
1495
1496
1497
1498
encode_name(rbml_w, nitem.ident.name);
1499
src/librustc/middle/stability.rs
@@ -129,6 +129,10 @@ impl<'v> Visitor<'v> for Annotator {
129
self.annotate(s.node.id, true, &s.node.attrs,
130
|v| visit::walk_struct_field(v, s));
131
132
+
133
+ fn visit_foreign_item(&mut self, i: &ast::ForeignItem) {
134
+ self.annotate(i.id, &i.attrs, |_| {});
135
+ }
136
137
138
impl Index {
0 commit comments