From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/rustdoc/const-intrinsic.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/rustdoc/const-intrinsic.rs (limited to 'tests/rustdoc/const-intrinsic.rs') 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' + #[stable(since="1.0.0", feature="rust1")] + #[rustc_const_stable(feature = "const_transmute", since = "1.56.0")] + pub fn transmute(_: 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() -> !; +} -- cgit v1.2.3