Skip to content

Commit 44f6f52

Browse files
committed
metadata: Encode attrs for foreign items.
Related to #19649 and #16289
1 parent 8f51ad2 commit 44f6f52

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
@@ -1478,6 +1478,7 @@ fn encode_info_for_foreign_item(ecx: &EncodeContext,
14781478
if abi == abi::RustIntrinsic {
14791479
encode_inlined_item(ecx, rbml_w, IIForeignRef(nitem));
14801480
}
1481+
encode_attributes(rbml_w, &*nitem.attrs);
14811482
encode_symbol(ecx, rbml_w, nitem.id);
14821483
}
14831484
ast::ForeignItemStatic(_, mutbl) => {
@@ -1488,6 +1489,7 @@ fn encode_info_for_foreign_item(ecx: &EncodeContext,
14881489
}
14891490
encode_bounds_and_type(rbml_w, ecx,
14901491
&lookup_item_type(ecx.tcx,local_def(nitem.id)));
1492+
encode_attributes(rbml_w, &*nitem.attrs);
14911493
encode_symbol(ecx, rbml_w, nitem.id);
14921494
encode_name(rbml_w, nitem.ident.name);
14931495
}

0 commit comments

Comments
 (0)