Add a few stubs required from std into the library
This commit is contained in:
parent
1888fa52d3
commit
5d65ad4efd
|
@ -3,6 +3,9 @@
|
|||
#![feature(asm)]
|
||||
#![feature(no_core)]
|
||||
#![feature(const_fn)]
|
||||
#![feature(associated_consts)]
|
||||
#![feature(lang_items)]
|
||||
#![feature(unwind_attributes)]
|
||||
|
||||
#![no_core]
|
||||
|
||||
|
@ -23,6 +26,8 @@ pub mod spi;
|
|||
mod register;
|
||||
mod pin;
|
||||
mod usart;
|
||||
#[doc(hidden)]
|
||||
pub mod std_stub;
|
||||
|
||||
pub enum DataDirection {
|
||||
Input,
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
//! Stub methods that `libstd` normally defines.
|
||||
|
||||
// These do not need to be in a module, but we group them here for clarity.
|
||||
pub mod std {
|
||||
#[lang = "eh_personality"]
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn rust_eh_personality(_state: (), _exception_object: *mut (), _context: *mut ()) -> () {
|
||||
}
|
||||
|
||||
#[lang = "panic_fmt"]
|
||||
#[unwind]
|
||||
pub extern fn rust_begin_panic(_msg: (), _file: &'static str, _line: u32) -> ! {
|
||||
loop { }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue