Skip to content

Commit f683040

Browse files
Add test for safe intrinsics
1 parent 91f491e commit f683040

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/test/rustdoc/safe-intrinsic.rs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#![feature(intrinsics)]
2+
#![feature(no_core)]
3+
4+
#![no_core]
5+
#![crate_name = "foo"]
6+
7+
extern "rust-intrinsic" {
8+
// @has 'foo/fn.abort.html'
9+
// @has - '//pre[@class="rust fn"]' 'pub extern "rust-intrinsic" fn abort() -> !'
10+
pub fn abort() -> !;
11+
// @has 'foo/fn.unreachable.html'
12+
// @has - '//pre[@class="rust fn"]' 'pub unsafe extern "rust-intrinsic" fn unreachable() -> !'
13+
pub fn unreachable() -> !;
14+
}
15+
16+
extern "C" {
17+
// @has 'foo/fn.needs_drop.html'
18+
// @has - '//pre[@class="rust fn"]' 'pub unsafe extern "C" fn needs_drop() -> !'
19+
pub fn needs_drop() -> !;
20+
}

0 commit comments

Comments
 (0)