@@ -24,7 +24,6 @@ use rustc_middle::query::Providers;
24
24
use rustc_middle:: ty:: { self , ExistentialTraitRef , TyCtxt } ;
25
25
use rustc_privacy:: DefIdVisitor ;
26
26
use rustc_session:: config:: CrateType ;
27
- use rustc_target:: spec:: abi:: Abi ;
28
27
29
28
/// Determines whether this item is recursive for reachability. See `is_recursively_reachable_local`
30
29
/// below for details.
@@ -164,16 +163,6 @@ impl<'tcx> ReachableContext<'tcx> {
164
163
if !self . any_library {
165
164
// If we are building an executable, only explicitly extern
166
165
// types need to be exported.
167
- let reachable =
168
- if let Node :: Item ( hir:: Item { kind : hir:: ItemKind :: Fn ( sig, ..) , .. } )
169
- | Node :: ImplItem ( hir:: ImplItem {
170
- kind : hir:: ImplItemKind :: Fn ( sig, ..) , ..
171
- } ) = * node
172
- {
173
- sig. header . abi != Abi :: Rust
174
- } else {
175
- false
176
- } ;
177
166
let codegen_attrs = if self . tcx . def_kind ( search_item) . has_codegen_attrs ( ) {
178
167
self . tcx . codegen_fn_attrs ( search_item)
179
168
} else {
@@ -182,7 +171,7 @@ impl<'tcx> ReachableContext<'tcx> {
182
171
let is_extern = codegen_attrs. contains_extern_indicator ( ) ;
183
172
let std_internal =
184
173
codegen_attrs. flags . contains ( CodegenFnAttrFlags :: RUSTC_STD_INTERNAL_SYMBOL ) ;
185
- if reachable || is_extern || std_internal {
174
+ if is_extern || std_internal {
186
175
self . reachable_symbols . insert ( search_item) ;
187
176
}
188
177
} else {
0 commit comments