Struct cranelift_codegen::verifier::VerifierError [−][src]
pub struct VerifierError {
pub location: AnyEntity,
pub context: Option<String>,
pub message: String,
}
Expand description
A verifier error.
Fields
location: AnyEntity
The entity causing the verifier error.
context: Option<String>
Optionally provide some context for the given location; e.g., for inst42
provide
Some("v3 = iconst.i32 0")
for more comprehensible errors.
message: String
The error message.
Trait Implementations
Convenience converter for making error-reporting less verbose.
Converts a tuple of (location, context, message)
to a VerifierError
.
use cranelift_codegen::verifier::VerifierErrors;
use cranelift_codegen::ir::Inst;
let mut errors = VerifierErrors::new();
errors.report((Inst::from_u32(42), "v3 = iadd v1, v2", "iadd cannot be used with values of this type"));
// note the double parenthenses to use this syntax
Convenience converter for making error-reporting less verbose.
Same as above but without context
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for VerifierError
impl Send for VerifierError
impl Sync for VerifierError
impl Unpin for VerifierError
impl UnwindSafe for VerifierError
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.