File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
compiler/rustc_passes/src Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,11 @@ impl CollectPrivateImplItemsVisitor<'_, '_> {
333
333
let codegen_attrs = self . tcx . codegen_fn_attrs ( def_id) ;
334
334
if codegen_attrs. contains_extern_indicator ( )
335
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.
339
+ || codegen_attrs. flags . contains ( CodegenFnAttrFlags :: USED )
340
+ || codegen_attrs. flags . contains ( CodegenFnAttrFlags :: USED_LINKER )
336
341
{
337
342
self . worklist . push ( def_id) ;
338
343
}
You can’t perform that action at this time.
0 commit comments