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 # Enable for no_std support
core = [ core = [
# `core` doesn't support vec_memory
"vec_memory",
"wasmi-validation/core", "wasmi-validation/core",
"libm" "libm"
] ]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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