diff --git a/cranelift/module/Cargo.toml b/cranelift/module/Cargo.toml index 765179c649..423b2fdf85 100644 --- a/cranelift/module/Cargo.toml +++ b/cranelift/module/Cargo.toml @@ -16,6 +16,7 @@ cranelift-entity = { path = "../entity", version = "0.59.0" } hashbrown = { version = "0.6", optional = true } log = { version = "0.4.6", default-features = false } thiserror = "1.0.4" +anyhow = "1.0" [features] default = ["std"] diff --git a/cranelift/module/src/module.rs b/cranelift/module/src/module.rs index daa83c2956..470eea17fe 100644 --- a/cranelift/module/src/module.rs +++ b/cranelift/module/src/module.rs @@ -149,7 +149,7 @@ pub enum ModuleError { Compilation(#[from] CodegenError), /// Wraps a generic error from a backend #[error("Backend error: {0}")] - Backend(String), + Backend(#[source] anyhow::Error), } /// A convenient alias for a `Result` that uses `ModuleError` as the error type.