File tree 1 file changed +4
-1
lines changed
compiler/rustc_passes/src
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -332,9 +332,12 @@ impl CollectPrivateImplItemsVisitor<'_, '_> {
332
332
// which are currently akin to allocator symbols.
333
333
let codegen_attrs = self . tcx . codegen_fn_attrs ( def_id) ;
334
334
if codegen_attrs. contains_extern_indicator ( )
335
+ || codegen_attrs. flags . contains ( CodegenFnAttrFlags :: RUSTC_STD_INTERNAL_SYMBOL )
336
+ // FIXME(nbdd0121): `#[used]` are marked as reachable here so it's picked up by
337
+ // `linked_symbols` in cg_ssa. They won't be exported in binary or cdylib due to their
338
+ // `SymbolExportLevel::Rust` export level but may end up being exported in dylibs.
335
339
|| codegen_attrs. flags . contains ( CodegenFnAttrFlags :: USED )
336
340
|| codegen_attrs. flags . contains ( CodegenFnAttrFlags :: USED_LINKER )
337
- || codegen_attrs. flags . contains ( CodegenFnAttrFlags :: RUSTC_STD_INTERNAL_SYMBOL )
338
341
{
339
342
self . worklist . push ( def_id) ;
340
343
}
You can’t perform that action at this time.
0 commit comments