Always treat #[rustc_std_internal_symbol]s as root TransItems.
This commit is contained in:
parent
8fcf3e33e4
commit
d141abfda7
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue