Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 732ded9

Browse files
Rollup merge of rust-lang#123063 - tmiasko:reachability-abi, r=michaelwoerister
Function ABI is irrelevant for reachability
2 parents c5e7f45 + 955f762 commit 732ded9

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

‎compiler/rustc_passes/src/reachable.rs‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use rustc_middle::query::Providers;
2424
use rustc_middle::ty::{self, ExistentialTraitRef, TyCtxt};
2525
use rustc_privacy::DefIdVisitor;
2626
use rustc_session::config::CrateType;
27-
use rustc_target::spec::abi::Abi;
2827

2928
/// Determines whether this item is recursive for reachability. See `is_recursively_reachable_local`
3029
/// below for details.
@@ -164,16 +163,6 @@ impl<'tcx> ReachableContext<'tcx> {
164163
if !self.any_library {
165164
// If we are building an executable, only explicitly extern
166165
// 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-
};
177166
let codegen_attrs = if self.tcx.def_kind(search_item).has_codegen_attrs() {
178167
self.tcx.codegen_fn_attrs(search_item)
179168
} else {
@@ -182,7 +171,7 @@ impl<'tcx> ReachableContext<'tcx> {
182171
let is_extern = codegen_attrs.contains_extern_indicator();
183172
let std_internal =
184173
codegen_attrs.flags.contains(CodegenFnAttrFlags::RUSTC_STD_INTERNAL_SYMBOL);
185-
if reachable || is_extern || std_internal {
174+
if is_extern || std_internal {
186175
self.reachable_symbols.insert(search_item);
187176
}
188177
} else {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /