Explicitly use the core crate

This way it shouldn't matter if anybody e.g. imports other `Option` or redefines `Result`.
This commit is contained in:
Sergey Pepyakin 2019-01-26 12:57:50 +01:00
parent c9c83e44c7
commit 0474402aca
1 changed files with 5 additions and 0 deletions

View File

@ -21,7 +21,12 @@ pub fn codegen(ext_def: &ImplBlockDef, to: &mut TokenStream) {
impl #impl_generics #ty #where_clause {
const __WASMI_DERIVE_IMPL: () = {
extern crate wasmi as _wasmi;
extern crate core as _core;
use _core::{
result::Result,
option::Option,
};
use _wasmi::{
Trap, RuntimeValue, RuntimeArgs, Externals, ValueType, ModuleImportResolver,
Signature, FuncRef, Error, FuncInstance,