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§
Source§impl Clone for VerifierError
impl Clone for VerifierError
Source§fn clone(&self) -> VerifierError
fn clone(&self) -> VerifierError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VerifierError
impl Debug for VerifierError
Source§impl Display for VerifierError
impl Display for VerifierError
Source§impl Error for VerifierError
impl Error for VerifierError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<L, C, M> From<(L, C, M)> for VerifierError
Convenience converter for making error-reporting less verbose.
impl<L, C, M> From<(L, C, M)> for VerifierError
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
Source§impl<L, M> From<(L, M)> for VerifierError
Convenience converter for making error-reporting less verbose.
impl<L, M> From<(L, M)> for VerifierError
Convenience converter for making error-reporting less verbose.
Same as above but without context
.
Source§impl PartialEq for VerifierError
impl PartialEq for VerifierError
impl Eq for VerifierError
impl StructuralPartialEq for VerifierError
Auto Trait Implementations§
impl Freeze for VerifierError
impl RefUnwindSafe for VerifierError
impl Send for VerifierError
impl Sync for VerifierError
impl Unpin for VerifierError
impl UnwindSafe for VerifierError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.