pub enum ModuleError {
Undeclared(String),
IncompatibleDeclaration(String),
IncompatibleSignature(String, Signature, Signature),
IncompatibleDataTls(String, bool, bool),
DuplicateDefinition(String),
InvalidImportDefinition(String),
Compilation(CodegenError),
Allocation {
err: Error,
},
Backend(Error),
Flag(SetError),
}Expand description
Error messages for all Module methods
Variants§
Undeclared(String)
Indicates an identifier was used before it was declared
IncompatibleDeclaration(String)
Indicates an identifier was used as data/function first, but then used as the other
IncompatibleSignature(String, Signature, Signature)
Indicates a function identifier was declared with a different signature than declared previously
IncompatibleDataTls(String, bool, bool)
Indicates a data object was declared as TLS but previously declared as not TLS or vice versa.
DuplicateDefinition(String)
Indicates an identifier was defined more than once
InvalidImportDefinition(String)
Indicates an identifier was defined, but was declared as an import
Compilation(CodegenError)
Wraps a cranelift-codegen error
Allocation
Memory allocation failure from a backend
Only the std builds carry this variant: the payload is a
std::io::Error and the only producer is cranelift-jit, which needs
std anyway.
Backend(Error)
Wraps a generic error from a backend
Flag(SetError)
Wraps an error from a flag definition.
Trait Implementations§
Source§impl Debug for ModuleError
impl Debug for ModuleError
Source§impl Display for ModuleError
impl Display for ModuleError
Source§impl Error for ModuleError
impl Error for ModuleError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()