@@ -323,10 +323,8 @@ fn exported_symbols_provider_local(
323
323
let reachable_set = tcx. reachable_set ( ( ) ) ;
324
324
let visibilities = tcx. effective_visibilities ( ( ) ) ;
325
325
let is_local_to_current_crate = |ty : Ty < ' _ > | {
326
-
327
326
let no_refs = ty. peel_refs ( ) ;
328
327
let root_def_id = match no_refs. kind ( ) {
329
- rustc_middle:: ty:: Adt ( adt_def, _) => adt_def. did ( ) ,
330
328
rustc_middle:: ty:: Closure ( closure, _) => * closure,
331
329
rustc_middle:: ty:: FnDef ( def_id, _) => * def_id,
332
330
rustc_middle:: ty:: Coroutine ( def_id, _) => * def_id,
@@ -366,7 +364,6 @@ fn exported_symbols_provider_local(
366
364
// this is OK, we explicitly allow sharing inline(never) across crates even
367
365
// without share-generics.
368
366
} else {
369
-
370
367
continue ;
371
368
}
372
369
}
@@ -377,17 +374,16 @@ fn exported_symbols_provider_local(
377
374
let has_generics = args. non_erasable_generics ( ) . next ( ) . is_some ( ) ;
378
375
379
376
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| {
383
379
arg. walk ( ) . all ( |ty| {
384
-
385
380
let Some ( ty) = ty. as_type ( ) else {
386
381
return true ;
387
382
} ;
388
383
!is_local_to_current_crate ( ty)
389
384
} )
390
- } ) ) ;
385
+ } ,
386
+ ) ;
391
387
392
388
if should_export {
393
389
let symbol = ExportedSymbol :: Generic ( def, args) ;
0 commit comments