]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/safe-intrinsic.rs
Rollup merge of #106407 - mejrs:attr_check, r=compiler-errors
[rust.git] / tests / rustdoc / safe-intrinsic.rs
1 #![feature(intrinsics)]
2 #![feature(no_core)]
3 #![feature(rustc_attrs)]
4
5 #![no_core]
6 #![crate_name = "foo"]
7
8 extern "rust-intrinsic" {
9     // @has 'foo/fn.abort.html'
10     // @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'pub extern "rust-intrinsic" fn abort() -> !'
11     #[rustc_safe_intrinsic]
12     pub fn abort() -> !;
13     // @has 'foo/fn.unreachable.html'
14     // @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'pub unsafe extern "rust-intrinsic" fn unreachable() -> !'
15     pub fn unreachable() -> !;
16 }
17
18 extern "C" {
19     // @has 'foo/fn.needs_drop.html'
20     // @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'pub unsafe extern "C" fn needs_drop() -> !'
21     pub fn needs_drop() -> !;
22 }