about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/tests/run/slice.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-11-08 10:28:47 +0000
committerbors <bors@rust-lang.org>2024-11-08 10:28:47 +0000
commit209799f3b910c64c8bd5001c0a8a55e03e7c2614 (patch)
tree7742027718a7631e05fedc7ad92332995190a3b6 /compiler/rustc_codegen_gcc/tests/run/slice.rs
parent6295686a37ed731f1059b07157170c9ac56bf8c3 (diff)
parente3010e84dbf2e06424c91c5a3d4206c1911813bd (diff)
downloadrust-209799f3b910c64c8bd5001c0a8a55e03e7c2614.tar.gz
rust-209799f3b910c64c8bd5001c0a8a55e03e7c2614.zip
Auto merge of #132717 - RalfJung:rustc_safe_intrinsic, r=compiler-errors
remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead

This brings us one step closer towards removing support for `extern "rust-intrinsic"` blocks, in favor of `#[rustc_intrinsic]` functions.

Also move `#[rustc_intrinsic]` under the `intrinsics` feature gate, to match the `extern "rust-intrinsic"` style.
Diffstat (limited to 'compiler/rustc_codegen_gcc/tests/run/slice.rs')
-rw-r--r--compiler/rustc_codegen_gcc/tests/run/slice.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_gcc/tests/run/slice.rs b/compiler/rustc_codegen_gcc/tests/run/slice.rs
index e86fc823a1a..35ad594ecde 100644
--- a/compiler/rustc_codegen_gcc/tests/run/slice.rs
+++ b/compiler/rustc_codegen_gcc/tests/run/slice.rs
@@ -103,9 +103,11 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
 mod intrinsics {
     use super::Sized;
 
-    extern "rust-intrinsic" {
-        #[rustc_safe_intrinsic]
-        pub fn abort() -> !;
+    #[rustc_nounwind]
+    #[rustc_intrinsic]
+    #[rustc_intrinsic_must_be_overridden]
+    pub fn abort() -> ! {
+        loop {}
     }
 }