summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/const-intrinsic.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/rustdoc/const-intrinsic.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc/const-intrinsic.rs')
-rw-r--r--tests/rustdoc/const-intrinsic.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/rustdoc/const-intrinsic.rs b/tests/rustdoc/const-intrinsic.rs
new file mode 100644
index 000000000..42f6ac792
--- /dev/null
+++ b/tests/rustdoc/const-intrinsic.rs
@@ -0,0 +1,25 @@
+#![feature(intrinsics)]
+#![feature(staged_api)]
+
+#![crate_name = "foo"]
+#![stable(since="1.0.0", feature="rust1")]
+
+extern "rust-intrinsic" {
+ // @has 'foo/fn.transmute.html'
+ // @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'pub const unsafe extern "rust-intrinsic" fn transmute<T, U>(_: T) -> U'
+ #[stable(since="1.0.0", feature="rust1")]
+ #[rustc_const_stable(feature = "const_transmute", since = "1.56.0")]
+ pub fn transmute<T, U>(_: T) -> U;
+
+ // @has 'foo/fn.unreachable.html'
+ // @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'pub unsafe extern "rust-intrinsic" fn unreachable() -> !'
+ #[stable(since="1.0.0", feature="rust1")]
+ pub fn unreachable() -> !;
+}
+
+extern "C" {
+ // @has 'foo/fn.needs_drop.html'
+ // @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'pub unsafe extern "C" fn needs_drop() -> !'
+ #[stable(since="1.0.0", feature="rust1")]
+ pub fn needs_drop() -> !;
+}