mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
Always treat #[rustc_std_internal_symbol]s as root TransItems.
This commit is contained in:
parent
8fcf3e33e4
commit
d141abfda7
@ -211,6 +211,8 @@ use trans_item::{TransItemExt, DefPathBasedNames, InstantiationMode};
|
||||
|
||||
use rustc_data_structures::bitvec::BitVector;
|
||||
|
||||
use syntax::attr;
|
||||
|
||||
#[derive(PartialEq, Eq, Hash, Clone, Copy, Debug)]
|
||||
pub enum TransItemCollectionMode {
|
||||
Eager,
|
||||
@ -981,7 +983,9 @@ impl<'b, 'a, 'v> RootCollector<'b, 'a, 'v> {
|
||||
}
|
||||
TransItemCollectionMode::Lazy => {
|
||||
self.entry_fn == Some(def_id) ||
|
||||
self.tcx.is_exported_symbol(def_id)
|
||||
self.tcx.is_exported_symbol(def_id) ||
|
||||
attr::contains_name(&self.tcx.get_attrs(def_id),
|
||||
"rustc_std_internal_symbol")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user