fix compilation for native

This commit is contained in:
Robert Habermeier
2018-02-06 12:24:34 +01:00
parent 5a675e9c64
commit af2fdc5478
12 changed files with 226 additions and 36 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ pub fn deserialize_check_len<'de, D>(deserializer: D, len: ExpectedLen) -> Resul
#[cfg(feature = "std")]
fn format_err(e: ::rustc_hex::FromHexError) -> String {
format!("invalid hex value: {:?}", e);
format!("invalid hex value: {:?}", e)
}
#[cfg(not(feature = "std"))]
+1 -12
View File
@@ -19,7 +19,7 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(feature = "std"), feature(alloc, lang_items))]
#![cfg_attr(not(feature = "std"), feature(alloc))]
extern crate rustc_hex;
extern crate serde;
@@ -63,17 +63,6 @@ macro_rules! try_opt {
}
}
#[lang = "panic_fmt"]
#[no_mangle]
pub extern fn panic_fmt(_fmt: ::core::fmt::Arguments, _file: &'static str, _line: u32, _col: u32) {
unsafe {
ext_print_utf8(_file.as_ptr() as *const u8, _file.len() as u32);
ext_print_num(_line as u64);
ext_print_num(_col as u64);
::core::intrinsics::abort()
}
}
mod bytes;
pub mod block;
pub mod contract;