From 0474402aca8dd13d949c2cf60b53de7ce1f00aab Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Sat, 26 Jan 2019 12:57:50 +0100 Subject: [PATCH] Explicitly use the core crate This way it shouldn't matter if anybody e.g. imports other `Option` or redefines `Result`. --- derive/src/codegen.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/derive/src/codegen.rs b/derive/src/codegen.rs index 1a481d9..c3acd08 100644 --- a/derive/src/codegen.rs +++ b/derive/src/codegen.rs @@ -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,