@@ -323,10 +323,8 @@ fn exported_symbols_provider_local(
323323 let reachable_set = tcx. reachable_set ( ( ) ) ;
324324 let visibilities = tcx. effective_visibilities ( ( ) ) ;
325325 let is_local_to_current_crate = |ty : Ty < ' _ > | {
326-
327326 let no_refs = ty. peel_refs ( ) ;
328327 let root_def_id = match no_refs. kind ( ) {
329- rustc_middle:: ty:: Adt ( adt_def, _) => adt_def. did ( ) ,
330328 rustc_middle:: ty:: Closure ( closure, _) => * closure,
331329 rustc_middle:: ty:: FnDef ( def_id, _) => * def_id,
332330 rustc_middle:: ty:: Coroutine ( def_id, _) => * def_id,
@@ -366,7 +364,6 @@ fn exported_symbols_provider_local(
366364 // this is OK, we explicitly allow sharing inline(never) across crates even
367365 // without share-generics.
368366 } else {
369-
370367 continue ;
371368 }
372369 }
@@ -377,17 +374,16 @@ fn exported_symbols_provider_local(
377374 let has_generics = args. non_erasable_generics ( ) . next ( ) . is_some ( ) ;
378375
379376 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| {
377+ && Some ( tcx. type_of ( def) . skip_binder ( ) ) . into_iter ( ) . chain ( types) . all (
378+ |arg| {
383379 arg. walk ( ) . all ( |ty| {
384-
385380 let Some ( ty) = ty. as_type ( ) else {
386381 return true ;
387382 } ;
388383 !is_local_to_current_crate ( ty)
389384 } )
390- } ) ) ;
385+ } ,
386+ ) ;
391387
392388 if should_export {
393389 let symbol = ExportedSymbol :: Generic ( def, args) ;
0 commit comments