about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/codegen_attrs.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-11-24 23:17:56 +0000
committerbors <bors@rust-lang.org>2024-11-24 23:17:56 +0000
commit28fc2ba7142654fa6e654926f96ff913027b200e (patch)
tree47ce907833aa4d4b770a5bb17ee0ebeac61b1c68 /compiler/rustc_codegen_ssa/src/codegen_attrs.rs
parent481b5fadd7994d0f04e9a6fe9ded3f22d6753825 (diff)
parentc50e19b69cf7f26fcd289c32a4f69adda5bc9470 (diff)
downloadrust-28fc2ba7142654fa6e654926f96ff913027b200e.tar.gz
rust-28fc2ba7142654fa6e654926f96ff913027b200e.zip
Auto merge of #133423 - jieyouxu:rollup-m3gyoz6, r=jieyouxu
Rollup of 6 pull requests

Successful merges:

 - #132730 (std: allow after-main use of synchronization primitives)
 - #133105 (only store valid proc macro item for doc link)
 - #133260 (Constify the `Deref`/`DerefMut` traits, too)
 - #133297 (Remove legacy bitcode for iOS)
 - #133298 (Mention that std::fs::remove_dir_all fails on files)
 - #133384 (add a test for target-feature-ABI warnings in closures and when calling extern fn)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/codegen_attrs.rs')
-rw-r--r--compiler/rustc_codegen_ssa/src/codegen_attrs.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs
index 32e9422e005..a5acd8170ab 100644
--- a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs
+++ b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs
@@ -576,9 +576,9 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
     // If this closure is marked `#[inline(always)]`, simply skip adding `#[target_feature]`.
     //
     // At this point, `unsafe` has already been checked and `#[target_feature]` only affects codegen.
-    // Emitting both `#[inline(always)]` and `#[target_feature]` can potentially result in an
-    // ICE, because LLVM errors when the function fails to be inlined due to a target feature
-    // mismatch.
+    // Due to LLVM limitations, emitting both `#[inline(always)]` and `#[target_feature]` is *unsound*:
+    // the function may be inlined into a caller with fewer target features. Also see
+    // <https://github.com/rust-lang/rust/issues/116573>.
     //
     // Using `#[inline(always)]` implies that this closure will most likely be inlined into
     // its parent function, which effectively inherits the features anyway. Boxing this closure