rust/tests/run-make/min-global-align/min_global_align.rs
David Wood 322cc31504
tests: {Meta,Pointee}Sized in non-minicore tests
As before, add `MetaSized` and `PointeeSized` traits to all of the
non-minicore `no_core` tests so that they don't fail for lack of
language items.
2025-06-16 23:04:33 +00:00

39 lines
776 B
Rust

#![feature(no_core, lang_items, freeze_impls)]
#![crate_type = "rlib"]
#![no_core]
pub static STATIC_BOOL: bool = true;
pub static mut STATIC_MUT_BOOL: bool = true;
const CONST_BOOL: bool = true;
pub static CONST_BOOL_REF: &'static bool = &CONST_BOOL;
#[lang = "pointee_sized"]
pub trait PointeeSized {}
#[lang = "meta_sized"]
pub trait MetaSized: PointeeSized {}
#[lang = "sized"]
pub trait Sized: MetaSized {}
#[lang = "copy"]
trait Copy {}
impl Copy for bool {}
impl Copy for &bool {}
#[lang = "freeze"]
trait Freeze {}
// No `UnsafeCell`, so everything is `Freeze`.
impl<T: ?Sized> Freeze for T {}
#[lang = "sync"]
trait Sync {}
impl Sync for bool {}
impl Sync for &'static bool {}
#[lang = "drop_in_place"]
pub unsafe fn drop_in_place<T: ?Sized>(_: *mut T) {}