rust/tests/run-make/min-global-align/min_global_align.rs

33 lines
633 B
Rust
Raw Normal View History

2017-09-08 17:55:28 -05:00
#![feature(no_core, lang_items)]
2020-02-03 14:12:42 -06:00
#![crate_type = "rlib"]
2017-09-08 17:55:28 -05:00
#![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 = "sized"]
trait Sized {}
#[lang = "copy"]
trait Copy {}
impl Copy for bool {}
impl Copy for &bool {}
2017-09-08 17:55:28 -05:00
#[lang = "freeze"]
trait Freeze {}
2020-02-03 14:12:42 -06:00
// No `UnsafeCell`, so everything is `Freeze`.
impl<T: ?Sized> Freeze for T {}
2017-09-08 17:55:28 -05:00
#[lang = "sync"]
trait Sync {}
impl Sync for bool {}
impl Sync for &'static bool {}
2020-02-03 14:12:42 -06:00
#[lang = "drop_in_place"]
pub unsafe fn drop_in_place<T: ?Sized>(_: *mut T) {}