From a0ddbf403cd52bc6d1e7f9547b87de3099bd35d1 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 3 May 2019 15:38:28 +0200 Subject: [PATCH] [wasm] Have the WasmError::User member be a String; --- cranelift/wasm/Cargo.toml | 2 +- cranelift/wasm/src/environ/spec.rs | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/cranelift/wasm/Cargo.toml b/cranelift/wasm/Cargo.toml index 7d9504aa54..2309322acb 100644 --- a/cranelift/wasm/Cargo.toml +++ b/cranelift/wasm/Cargo.toml @@ -27,7 +27,7 @@ target-lexicon = "0.4.0" [features] default = ["std"] -std = ["cranelift-codegen/std", "cranelift-frontend/std", "wasmparser/std", "failure/std"] +std = ["cranelift-codegen/std", "cranelift-frontend/std", "wasmparser/std"] core = ["hashmap_core", "cranelift-codegen/core", "cranelift-frontend/core", "wasmparser/core"] [badges] diff --git a/cranelift/wasm/src/environ/spec.rs b/cranelift/wasm/src/environ/spec.rs index ac58fd7215..d307922677 100644 --- a/cranelift/wasm/src/environ/spec.rs +++ b/cranelift/wasm/src/environ/spec.rs @@ -68,17 +68,9 @@ pub enum WasmError { #[fail(display = "Implementation limit exceeded")] ImplLimitExceeded, - /// Any user-defined error. Requires an std build, where failure::Error is defined. - #[cfg(feature = "std")] + /// Any user-defined error. #[fail(display = "User error: {}", _0)] - User(failure::Error), -} - -#[cfg(feature = "std")] -impl From for WasmError { - fn from(err: failure::Error) -> Self { - WasmError::User(err) - } + User(std::string::String), } impl From for WasmError {