@@ -19,7 +19,6 @@ use rustc_middle::query::Providers;
19
19
use rustc_middle:: ty:: { self , ExistentialTraitRef , TyCtxt } ;
20
20
use rustc_privacy:: DefIdVisitor ;
21
21
use rustc_session:: config:: CrateType ;
22
- use rustc_target:: spec:: abi:: Abi ;
23
22
24
23
fn item_might_be_inlined ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> bool {
25
24
tcx. generics_of ( def_id) . requires_monomorphization ( tcx)
@@ -141,16 +140,6 @@ impl<'tcx> ReachableContext<'tcx> {
141
140
if !self . any_library {
142
141
// If we are building an executable, only explicitly extern
143
142
// types need to be exported.
144
- let reachable =
145
- if let Node :: Item ( hir:: Item { kind : hir:: ItemKind :: Fn ( sig, ..) , .. } )
146
- | Node :: ImplItem ( hir:: ImplItem {
147
- kind : hir:: ImplItemKind :: Fn ( sig, ..) , ..
148
- } ) = * node
149
- {
150
- sig. header . abi != Abi :: Rust
151
- } else {
152
- false
153
- } ;
154
143
let codegen_attrs = if self . tcx . def_kind ( search_item) . has_codegen_attrs ( ) {
155
144
self . tcx . codegen_fn_attrs ( search_item)
156
145
} else {
@@ -159,7 +148,7 @@ impl<'tcx> ReachableContext<'tcx> {
159
148
let is_extern = codegen_attrs. contains_extern_indicator ( ) ;
160
149
let std_internal =
161
150
codegen_attrs. flags . contains ( CodegenFnAttrFlags :: RUSTC_STD_INTERNAL_SYMBOL ) ;
162
- if reachable || is_extern || std_internal {
151
+ if is_extern || std_internal {
163
152
self . reachable_symbols . insert ( search_item) ;
164
153
}
165
154
} else {
0 commit comments