Remove unneeded extern crate, macro_use, and tidy uses.

This commit is contained in:
Dan Gohman
2019-11-08 17:13:06 -08:00
parent 31f8f124f5
commit 061b453255
62 changed files with 126 additions and 262 deletions

View File

@@ -24,15 +24,13 @@ use core::any::Any;
use core::borrow::Borrow;
use core::cell::RefCell;
use core::convert::TryFrom;
use core::slice;
use core::{mem, ptr};
use cranelift_entity::EntityRef;
use cranelift_entity::{BoxedSlice, PrimaryMap};
use core::{mem, ptr, slice};
use cranelift_entity::{BoxedSlice, EntityRef, PrimaryMap};
use cranelift_wasm::{
DefinedFuncIndex, DefinedGlobalIndex, DefinedMemoryIndex, DefinedTableIndex, FuncIndex,
GlobalIndex, GlobalInit, MemoryIndex, SignatureIndex, TableIndex,
};
use indexmap;
use memoffset::offset_of;
use more_asserts::assert_lt;
use thiserror::Error;
use wasmtime_environ::{DataInitializer, Module, TableElements, VMOffsets};

View File

@@ -23,10 +23,6 @@
)]
#![cfg_attr(not(feature = "std"), no_std)]
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate memoffset;
extern crate alloc;
mod export;

View File

@@ -8,6 +8,7 @@ use crate::vmcontext::VMContext;
use crate::RwLock;
use core::borrow::{Borrow, BorrowMut};
use core::cell::Cell;
use lazy_static::lazy_static;
#[derive(Default)]
struct TrapContext {

View File

@@ -21,6 +21,7 @@ pub struct VMFunctionImport {
mod test_vmfunction_import {
use super::VMFunctionImport;
use core::mem::size_of;
use memoffset::offset_of;
use wasmtime_environ::{Module, VMOffsets};
#[test]
@@ -76,6 +77,7 @@ pub struct VMTableImport {
mod test_vmtable_import {
use super::VMTableImport;
use core::mem::size_of;
use memoffset::offset_of;
use wasmtime_environ::{Module, VMOffsets};
#[test]
@@ -113,6 +115,7 @@ pub struct VMMemoryImport {
mod test_vmmemory_import {
use super::VMMemoryImport;
use core::mem::size_of;
use memoffset::offset_of;
use wasmtime_environ::{Module, VMOffsets};
#[test]
@@ -147,6 +150,7 @@ pub struct VMGlobalImport {
mod test_vmglobal_import {
use super::VMGlobalImport;
use core::mem::size_of;
use memoffset::offset_of;
use wasmtime_environ::{Module, VMOffsets};
#[test]
@@ -181,6 +185,7 @@ pub struct VMMemoryDefinition {
mod test_vmmemory_definition {
use super::VMMemoryDefinition;
use core::mem::size_of;
use memoffset::offset_of;
use wasmtime_environ::{Module, VMOffsets};
#[test]
@@ -224,6 +229,7 @@ pub struct VMTableDefinition {
mod test_vmtable_definition {
use super::VMTableDefinition;
use core::mem::size_of;
use memoffset::offset_of;
use wasmtime_environ::{Module, VMOffsets};
#[test]
@@ -480,6 +486,7 @@ pub struct VMCallerCheckedAnyfunc {
mod test_vmcaller_checked_anyfunc {
use super::VMCallerCheckedAnyfunc;
use core::mem::size_of;
use memoffset::offset_of;
use wasmtime_environ::{Module, VMOffsets};
#[test]