rust/tests/rustdoc/safe-intrinsic.rs
David Wood da47753496
rustdoc: {Meta,Pointee,}Sized in non-minicore
Some rustdoc tests are `no_core` and need to have `MetaSized` and
`PointeeSized` added to them.
2025-06-16 23:04:36 +00:00

25 lines
580 B
Rust

#![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() -> !;