mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +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.
24 lines
424 B
Rust
24 lines
424 B
Rust
#![feature(no_core, lang_items)]
|
|
#![no_std]
|
|
#![no_core]
|
|
#![crate_type = "lib"]
|
|
|
|
// This is needed because of #![no_core]:
|
|
#[lang = "pointee_sized"]
|
|
trait PointeeSized {}
|
|
#[lang = "meta_sized"]
|
|
trait MetaSized: PointeeSized {}
|
|
#[lang = "sized"]
|
|
trait Sized: MetaSized {}
|
|
|
|
#[link(name = "extern_1", kind = "raw-dylib")]
|
|
extern "C" {
|
|
fn extern_fn();
|
|
}
|
|
|
|
pub fn extern_fn_caller() {
|
|
unsafe {
|
|
extern_fn();
|
|
}
|
|
}
|