about summary refs log tree commit diff
path: root/tests/rustdoc/safe-intrinsic.rs
blob: a40116894a84a9913ef920b7587362e1add63e92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#![feature(intrinsics)]
#![feature(no_core, lang_items)]
#![feature(rustc_attrs)]

#![no_core]
#![crate_name = "foo"]

#[lang = "pointee_sized"]
pub trait PointeeSized {}

#[lang = "meta_sized"]
pub trait MetaSized: PointeeSized {}

#[lang = "sized"]
pub trait Sized: MetaSized {}

//@ 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() -> !;