about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-08 17:31:40 +0000
committerbors <bors@rust-lang.org>2025-07-08 17:31:40 +0000
commitab68b0fb26485ab1fa6977b2d8b59cc8a171c4aa (patch)
tree9005a774102752e63c61648c7d57543e7e3de7ab /compiler/rustc_codegen_ssa/src
parentf838cbc06de60819faff3413f374706b74824ca2 (diff)
parentf3226b47b85c3ed9d1db799c16d9397361696b1e (diff)
downloadrust-ab68b0fb26485ab1fa6977b2d8b59cc8a171c4aa.tar.gz
rust-ab68b0fb26485ab1fa6977b2d8b59cc8a171c4aa.zip
Auto merge of #143645 - matthiaskrgr:rollup-d2a3leo, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#143402 (Port several linking (linkage?) related attributes the new attribute system )
 - rust-lang/rust#143555 (Don't mark `#[target_feature]` safe fns as unsafe in rustdoc JSON.)
 - rust-lang/rust#143593 (Port #[rustc_dummy])
 - rust-lang/rust#143600 (Update intro blurb in `wasm32-wasip1` docs)
 - rust-lang/rust#143603 (Clarify the meaning of `AttributeOrder::KeepFirst` and `AttributeOrder::KeepLast`)
 - rust-lang/rust#143620 (fix: Remove newline from multiple crate versions note)
 - rust-lang/rust#143622 (Add target maintainer information for mips64-unknown-linux-muslabi64)

Failed merges:

 - rust-lang/rust#143403 (Port several trait/coherence-related attributes the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/codegen_attrs.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs
index ff454427871..85d01d4f938 100644
--- a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs
+++ b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs
@@ -203,6 +203,13 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
                     UsedBy::Compiler => codegen_fn_attrs.flags |= CodegenFnAttrFlags::USED_COMPILER,
                     UsedBy::Linker => codegen_fn_attrs.flags |= CodegenFnAttrFlags::USED_LINKER,
                 },
+                AttributeKind::FfiConst(_) => {
+                    codegen_fn_attrs.flags |= CodegenFnAttrFlags::FFI_CONST
+                }
+                AttributeKind::FfiPure(_) => codegen_fn_attrs.flags |= CodegenFnAttrFlags::FFI_PURE,
+                AttributeKind::StdInternalSymbol(_) => {
+                    codegen_fn_attrs.flags |= CodegenFnAttrFlags::RUSTC_STD_INTERNAL_SYMBOL
+                }
                 _ => {}
             }
         }
@@ -213,17 +220,12 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
 
         match name {
             sym::rustc_allocator => codegen_fn_attrs.flags |= CodegenFnAttrFlags::ALLOCATOR,
-            sym::ffi_pure => codegen_fn_attrs.flags |= CodegenFnAttrFlags::FFI_PURE,
-            sym::ffi_const => codegen_fn_attrs.flags |= CodegenFnAttrFlags::FFI_CONST,
             sym::rustc_nounwind => codegen_fn_attrs.flags |= CodegenFnAttrFlags::NEVER_UNWIND,
             sym::rustc_reallocator => codegen_fn_attrs.flags |= CodegenFnAttrFlags::REALLOCATOR,
             sym::rustc_deallocator => codegen_fn_attrs.flags |= CodegenFnAttrFlags::DEALLOCATOR,
             sym::rustc_allocator_zeroed => {
                 codegen_fn_attrs.flags |= CodegenFnAttrFlags::ALLOCATOR_ZEROED
             }
-            sym::rustc_std_internal_symbol => {
-                codegen_fn_attrs.flags |= CodegenFnAttrFlags::RUSTC_STD_INTERNAL_SYMBOL
-            }
             sym::thread_local => codegen_fn_attrs.flags |= CodegenFnAttrFlags::THREAD_LOCAL,
             sym::linkage => {
                 if let Some(val) = attr.value_str() {