mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 04:07:57 +00:00
Fix for nightly 2018-07-10 (#296)
* Use [alloc_error_handler] instead of oom lang item * Same fix for basic_add * Drive by fix for duplicate generic parameter * Rebuild binaries.
This commit is contained in:
committed by
Gav Wood
parent
b239fe0acc
commit
042ded7cc5
@@ -17,7 +17,13 @@
|
||||
//! Basic parachain that adds a number as part of its state.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![cfg_attr(not(feature = "std"), feature(alloc, core_intrinsics, lang_items, panic_implementation, core_panic_info))]
|
||||
#![cfg_attr(
|
||||
not(feature = "std"),
|
||||
feature(
|
||||
alloc, core_intrinsics, lang_items, panic_implementation, core_panic_info,
|
||||
alloc_error_handler
|
||||
)
|
||||
)]
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
extern crate alloc;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Defines WASM module logic.
|
||||
|
||||
use core::{intrinsics, panic};
|
||||
use core::{intrinsics, panic, alloc};
|
||||
use parachain::{self, ValidationResult};
|
||||
use parachain::codec::Slicable;
|
||||
use super::{HeadData, BlockData};
|
||||
@@ -29,9 +29,9 @@ pub fn panic(_info: &panic::PanicInfo) -> ! {
|
||||
}
|
||||
}
|
||||
|
||||
#[lang = "oom"]
|
||||
#[alloc_error_handler]
|
||||
#[no_mangle]
|
||||
pub fn oom() -> ! {
|
||||
pub fn oom(_: alloc::Layout) -> ! {
|
||||
unsafe {
|
||||
intrinsics::abort();
|
||||
}
|
||||
|
||||
BIN
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user