mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-24 03:07:23 +00:00
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.
39 lines
776 B
Rust
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) {}
|