Skip to content

Commit d141abf

Browse files
Always treat #[rustc_std_internal_symbol]s as root TransItems.
1 parent 8fcf3e3 commit d141abf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustc_trans_utils/collector.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ use trans_item::{TransItemExt, DefPathBasedNames, InstantiationMode};
211211

212212
use rustc_data_structures::bitvec::BitVector;
213213

214+
use syntax::attr;
215+
214216
#[derive(PartialEq, Eq, Hash, Clone, Copy, Debug)]
215217
pub enum TransItemCollectionMode {
216218
Eager,
@@ -981,7 +983,9 @@ impl<'b, 'a, 'v> RootCollector<'b, 'a, 'v> {
981983
}
982984
TransItemCollectionMode::Lazy => {
983985
self.entry_fn == Some(def_id) ||
984-
self.tcx.is_exported_symbol(def_id)
986+
self.tcx.is_exported_symbol(def_id) ||
987+
attr::contains_name(&self.tcx.get_attrs(def_id),
988+
"rustc_std_internal_symbol")
985989
}
986990
}
987991
}

0 commit comments

Comments
 (0)