about summary refs log tree commit diff
path: root/tests/rustdoc
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-11-07 08:59:43 +0100
committerRalf Jung <post@ralfj.de>2024-11-08 09:16:00 +0100
commite3010e84dbf2e06424c91c5a3d4206c1911813bd (patch)
treee79c95932b5c88f5313d5eb5e45b3c3c41ed7b9f /tests/rustdoc
parent78bb5ee79e0261e8e47476b631da02acc1cb03ef (diff)
downloadrust-e3010e84dbf2e06424c91c5a3d4206c1911813bd.tar.gz
rust-e3010e84dbf2e06424c91c5a3d4206c1911813bd.zip
remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead
Diffstat (limited to 'tests/rustdoc')
-rw-r--r--tests/rustdoc/safe-intrinsic.rs25
1 files changed, 12 insertions, 13 deletions
diff --git a/tests/rustdoc/safe-intrinsic.rs b/tests/rustdoc/safe-intrinsic.rs
index b46ffed99c3..07af04ace60 100644
--- a/tests/rustdoc/safe-intrinsic.rs
+++ b/tests/rustdoc/safe-intrinsic.rs
@@ -5,18 +5,17 @@
 #![no_core]
 #![crate_name = "foo"]
 
-extern "rust-intrinsic" {
-    //@ has 'foo/fn.abort.html'
-    //@ has - '//pre[@class="rust item-decl"]' 'pub extern "rust-intrinsic" fn abort() -> !'
-    #[rustc_safe_intrinsic]
-    pub fn abort() -> !;
-    //@ has 'foo/fn.unreachable.html'
-    //@ has - '//pre[@class="rust item-decl"]' 'pub unsafe extern "rust-intrinsic" fn unreachable() -> !'
-    pub fn unreachable() -> !;
+//@ has 'foo/fn.abort.html'
+//@ has - '//pre[@class="rust item-decl"]' 'pub fn abort() -> !'
+#[rustc_intrinsic]
+#[rustc_intrinsic_must_be_overridden]
+pub fn abort() -> ! {
+    loop {}
 }
-
-extern "C" {
-    //@ has 'foo/fn.needs_drop.html'
-    //@ has - '//pre[@class="rust item-decl"]' 'pub unsafe extern "C" fn needs_drop() -> !'
-    pub fn needs_drop() -> !;
+//@ has 'foo/fn.unreachable.html'
+//@ has - '//pre[@class="rust item-decl"]' 'pub unsafe fn unreachable() -> !'
+#[rustc_intrinsic]
+#[rustc_intrinsic_must_be_overridden]
+pub unsafe fn unreachable() -> ! {
+    loop {}
 }