Fix nightly

This commit is contained in:
Sergey Pepyakin 2019-07-10 17:20:47 +03:00
parent cc7de205a6
commit 176150d25e
18 changed files with 29 additions and 45 deletions

View File

@ -35,6 +35,8 @@ std = [
]
# Enable for no_std support
core = [
# `core` doesn't support vec_memory
"vec_memory",
"wasmi-validation/core",
"libm"
]

View File

@ -1,6 +1,7 @@
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::rc::{Rc, Weak};
use alloc::{
rc::{Rc, Weak},
vec::Vec,
};
use core::fmt;
use host::Externals;
use isa;

View File

@ -1,7 +1,4 @@
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::collections::BTreeMap;
use alloc::{collections::BTreeMap, string::String};
use func::FuncRef;
use global::GlobalRef;

View File

@ -67,8 +67,7 @@
//! - Reserved immediates are ignored for `call_indirect`, `current_memory`, `grow_memory`.
//!
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::vec::Vec;
/// Should we keep a value before "discarding" a stack frame?
///

View File

@ -96,8 +96,6 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
//// alloc is required in no_std
#![cfg_attr(not(feature = "std"), feature(alloc, alloc_prelude))]
#[cfg(not(feature = "std"))]
#[macro_use]
@ -119,8 +117,11 @@ extern crate parity_wasm;
extern crate wasmi_validation as validation;
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::{
boxed::Box,
string::{String, ToString},
vec::Vec,
};
use core::fmt;
#[cfg(feature = "std")]
use std::error;

View File

@ -1,6 +1,4 @@
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::rc::Rc;
use alloc::{rc::Rc, string::ToString, vec::Vec};
use core::{
cell::{Cell, RefCell},
cmp, fmt,

View File

@ -1,6 +1,6 @@
//! An implementation of `ByteBuf` based on a plain `Vec`.
use alloc::prelude::v1::*;
use alloc::vec::Vec;
pub struct ByteBuf {
buf: Vec<u8>,

View File

@ -1,6 +1,9 @@
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::rc::Rc;
use alloc::{
borrow::ToOwned,
rc::Rc,
string::{String, ToString},
vec::Vec,
};
use core::cell::RefCell;
use core::fmt;
use Trap;

View File

@ -1,8 +1,5 @@
#![allow(missing_docs)]
#[cfg(not(feature = "std"))]
use libm::{F32Ext, F64Ext};
use core::cmp::{Ordering, PartialEq, PartialOrd};
use core::ops::{Add, Div, Mul, Neg, Rem, Sub};

View File

@ -1,5 +1,4 @@
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::{string::String, vec::Vec};
use parity_wasm::elements::{BlockType, FuncBody, Instruction};

View File

@ -1,5 +1,4 @@
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::vec::Vec;
use crate::{
isa,

View File

@ -1,5 +1,4 @@
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::{boxed::Box, vec::Vec};
use core::fmt;
use core::ops;
use core::{u32, usize};

View File

@ -1,6 +1,4 @@
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::rc::Rc;
use alloc::{rc::Rc, vec::Vec};
use core::cell::RefCell;
use core::fmt;
use core::u32;

View File

@ -1,6 +1,5 @@
use crate::Error;
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::vec::Vec;
use parity_wasm::elements::{
BlockType, FunctionType, GlobalType, MemoryType, TableType, ValueType,
};

View File

@ -1,6 +1,3 @@
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use crate::{
context::ModuleContext, stack::StackWithLimit, util::Locals, Error, FuncValidator,
DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX,

View File

@ -2,8 +2,6 @@
// #![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
//// alloc is required in no_std
#![cfg_attr(not(feature = "std"), feature(alloc, alloc_prelude))]
#[cfg(not(feature = "std"))]
#[macro_use]
@ -21,8 +19,7 @@ pub const DEFAULT_TABLE_INDEX: u32 = 0;
/// Maximal number of pages that a wasm instance supports.
pub const LINEAR_MEMORY_MAX_PAGES: u32 = 65536;
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::{string::String, vec::Vec};
use core::fmt;
#[cfg(feature = "std")]
use std::error;

View File

@ -1,5 +1,4 @@
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::{string::String, vec::Vec};
use core::fmt;
#[cfg(feature = "std")]

View File

@ -1,6 +1,5 @@
use crate::Error;
#[allow(unused_imports)]
use alloc::prelude::v1::*;
use alloc::string::String;
use parity_wasm::elements::{Local, ValueType};
#[cfg(test)]