Closed
Description
For example, this compiles with no warnings or errors:
#![feature(lang_items)]
#![crate_type="staticlib"]
#![allow(missing_copy_implementations)]
#![deny(improper_ctypes)]
#![no_std]
pub struct Blah {
pub x: i32
}
#[no_mangle]
pub extern "C" fn yikes(b: Blah) -> i32 {
b.x
}
#[lang = "copy"] trait Copy {}
#[lang = "sized"] trait Sized {}
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
#[lang = "eh_personality"] extern fn eh_personality() {}
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
Even though Blah
lacks the #[repr(C)]
attribute.