rust/tests/rustdoc/safe-intrinsic.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
511 B
Rust
Raw Normal View History

2021-06-15 09:08:18 -05:00
#![feature(intrinsics)]
#![feature(no_core)]
#![feature(rustc_attrs)]
2021-06-15 09:08:18 -05:00
#![no_core]
#![crate_name = "foo"]
//@ 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 {}
2021-06-15 09:08:18 -05:00
}
//@ 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 {}
2021-06-15 09:08:18 -05:00
}