Skip to content

Commit 09c91f7

Browse files
committed
Treat Adts as always reachable
1 parent 26f4b09 commit 09c91f7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

compiler/rustc_codegen_ssa/src/back/symbol_export.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ fn exported_symbols_provider_local(
326326

327327
let no_refs = ty.peel_refs();
328328
let root_def_id = match no_refs.kind() {
329-
rustc_middle::ty::Adt(adt_def, _) => adt_def.did(),
330329
rustc_middle::ty::Closure(closure, _) => *closure,
331330
rustc_middle::ty::FnDef(def_id, _) => *def_id,
332331
rustc_middle::ty::Coroutine(def_id, _) => *def_id,
@@ -377,17 +376,15 @@ fn exported_symbols_provider_local(
377376
let has_generics = args.non_erasable_generics().next().is_some();
378377

379378
let should_export = has_generics
380-
&& ( (tcx.codegen_fn_attrs(mono_item.def_id()).inline
381-
!= rustc_attr_parsing::InlineAttr::None)
382-
|| Some(tcx.type_of(def).skip_binder()).into_iter().chain(types).all(|arg| {
379+
&& Some(tcx.type_of(def).skip_binder()).into_iter().chain(types).all(|arg| {
383380
arg.walk().all(|ty| {
384381

385382
let Some(ty) = ty.as_type() else {
386383
return true;
387384
};
388385
!is_local_to_current_crate(ty)
389386
})
390-
}));
387+
});
391388

392389
if should_export {
393390
let symbol = ExportedSymbol::Generic(def, args);

0 commit comments

Comments
 (0)