Skip to content

Commit 2ed8d33

Browse files
committed
---
yaml --- r: 165489 b: refs/heads/master c: fb9b451 h: refs/heads/master i: 165487: b8f8e9d v: v3
1 parent 2062816 commit 2ed8d33

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 44f6f52578d5711ba8f395c8d5da577bb3c5fe15
2+
refs/heads/master: fb9b45189effece40b2b672fc4fd3b01e15f19cb
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 658529467d9d69ac9e09cacf98a6d61d781c2c76
55
refs/heads/try: aee614fc4973262a5a68efc643026e2b1458d65b

trunk/src/librustc/metadata/encoder.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,6 +1479,8 @@ fn encode_info_for_foreign_item(ecx: &EncodeContext,
14791479
encode_inlined_item(ecx, rbml_w, IIForeignRef(nitem));
14801480
}
14811481
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);
14821484
encode_symbol(ecx, rbml_w, nitem.id);
14831485
}
14841486
ast::ForeignItemStatic(_, mutbl) => {
@@ -1490,6 +1492,8 @@ fn encode_info_for_foreign_item(ecx: &EncodeContext,
14901492
encode_bounds_and_type(rbml_w, ecx,
14911493
&lookup_item_type(ecx.tcx,local_def(nitem.id)));
14921494
encode_attributes(rbml_w, &*nitem.attrs);
1495+
let stab = stability::lookup(ecx.tcx, ast_util::local_def(nitem.id));
1496+
encode_stability(rbml_w, stab);
14931497
encode_symbol(ecx, rbml_w, nitem.id);
14941498
encode_name(rbml_w, nitem.ident.name);
14951499
}

trunk/src/librustc/middle/stability.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ impl<'v> Visitor<'v> for Annotator {
111111
fn visit_struct_field(&mut self, s: &StructField) {
112112
self.annotate(s.node.id, &s.node.attrs, |v| visit::walk_struct_field(v, s));
113113
}
114+
115+
fn visit_foreign_item(&mut self, i: &ast::ForeignItem) {
116+
self.annotate(i.id, &i.attrs, |_| {});
117+
}
114118
}
115119

116120
impl Index {

0 commit comments

Comments
 (0)