Implement RFC 1260 with feature_name imported_main.
This commit is contained in:
@@ -1066,7 +1066,7 @@ struct RootCollector<'a, 'tcx> {
|
||||
tcx: TyCtxt<'tcx>,
|
||||
mode: MonoItemCollectionMode,
|
||||
output: &'a mut Vec<Spanned<MonoItem<'tcx>>>,
|
||||
entry_fn: Option<(LocalDefId, EntryFnType)>,
|
||||
entry_fn: Option<(DefId, EntryFnType)>,
|
||||
}
|
||||
|
||||
impl ItemLikeVisitor<'v> for RootCollector<'_, 'v> {
|
||||
@@ -1154,7 +1154,7 @@ impl RootCollector<'_, 'v> {
|
||||
&& match self.mode {
|
||||
MonoItemCollectionMode::Eager => true,
|
||||
MonoItemCollectionMode::Lazy => {
|
||||
self.entry_fn.map(|(id, _)| id) == Some(def_id)
|
||||
self.entry_fn.and_then(|(id, _)| id.as_local()) == Some(def_id)
|
||||
|| self.tcx.is_reachable_non_generic(def_id)
|
||||
|| self
|
||||
.tcx
|
||||
|
||||
Reference in New Issue
Block a user