rust/tests/rustdoc/safe-intrinsic.rs

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

19 lines
451 B
Rust
Raw Normal View History

2021-06-15 16:08:18 +02:00
#![feature(intrinsics)]
#![feature(no_core, lang_items)]
#![feature(rustc_attrs)]
2021-06-15 16:08:18 +02:00
#![no_core]
#![crate_name = "foo"]
#[lang = "sized"]
trait Sized {}
//@ has 'foo/fn.abort.html'
//@ has - '//pre[@class="rust item-decl"]' 'pub fn abort() -> !'
#[rustc_intrinsic]
pub fn abort() -> !;
//@ has 'foo/fn.unreachable.html'
//@ has - '//pre[@class="rust item-decl"]' 'pub unsafe fn unreachable() -> !'
#[rustc_intrinsic]
pub unsafe fn unreachable() -> !;