From f305b3cd1f0c5b035e6f7034e632d22637b768f9 Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Tue, 12 Jun 2018 14:00:57 +0300 Subject: [PATCH] Fix wasm benches on nightly (#93) --- .travis.yml | 2 +- benches/wasm-kernel/src/lib.rs | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3cf1344..68a5cda 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ install: - command -v cargo-deadlinks &> /dev/null || cargo install cargo-deadlinks - if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then rustup target add wasm32-unknown-unknown; fi script: -# Make sure fuzz targets are not broken. +# Make sure nightly targets are not broken. - if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then cargo check --tests --manifest-path=fuzz/Cargo.toml; fi - if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then cargo check --benches --manifest-path=benches/Cargo.toml; fi - ./test.sh diff --git a/benches/wasm-kernel/src/lib.rs b/benches/wasm-kernel/src/lib.rs index 39a6372..ee172ff 100644 --- a/benches/wasm-kernel/src/lib.rs +++ b/benches/wasm-kernel/src/lib.rs @@ -1,6 +1,7 @@ #![no_std] #![feature(lang_items)] #![feature(core_intrinsics)] +#![feature(panic_implementation)] extern crate rlibc; extern crate tiny_keccak; @@ -8,13 +9,8 @@ extern crate tiny_keccak; use tiny_keccak::Keccak; #[no_mangle] -#[lang = "panic_fmt"] -pub extern "C" fn panic_fmt( - _args: ::core::fmt::Arguments, - _file: &'static str, - _line: u32, - _col: u32, -) -> ! { +#[panic_implementation] +pub fn panic_fmt(_info: &::core::panic::PanicInfo) -> ! { use core::intrinsics; unsafe { intrinsics::abort();