File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
compiler/rustc_passes/src Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -332,9 +332,12 @@ impl CollectPrivateImplItemsVisitor<'_, '_> {
332332 // which are currently akin to allocator symbols.
333333 let codegen_attrs = self . tcx . codegen_fn_attrs ( def_id) ;
334334 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.
335339 || codegen_attrs. flags . contains ( CodegenFnAttrFlags :: USED )
336340 || codegen_attrs. flags . contains ( CodegenFnAttrFlags :: USED_LINKER )
337- || codegen_attrs. flags . contains ( CodegenFnAttrFlags :: RUSTC_STD_INTERNAL_SYMBOL )
338341 {
339342 self . worklist . push ( def_id) ;
340343 }
You can’t perform that action at this time.
0 commit comments