Struct cranelift_codegen::verifier::VerifierError
source · [−]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
sourceimpl Clone for VerifierError
impl Clone for VerifierError
sourcefn clone(&self) -> VerifierError
fn clone(&self) -> VerifierError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for VerifierError
impl Debug for VerifierError
sourceimpl Display for VerifierError
impl Display for VerifierError
sourceimpl Error for VerifierError
impl Error for VerifierError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl<L, C, M> From<(L, C, M)> for VerifierError where
L: Into<AnyEntity>,
C: Into<String>,
M: Into<String>,
impl<L, C, M> From<(L, C, M)> for VerifierError where
L: Into<AnyEntity>,
C: Into<String>,
M: Into<String>,
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
sourceimpl<L, M> From<(L, M)> for VerifierError where
L: Into<AnyEntity>,
M: Into<String>,
impl<L, M> From<(L, M)> for VerifierError where
L: Into<AnyEntity>,
M: Into<String>,
Convenience converter for making error-reporting less verbose.
Same as above but without context
.
sourceimpl PartialEq<VerifierError> for VerifierError
impl PartialEq<VerifierError> for VerifierError
sourcefn eq(&self, other: &VerifierError) -> bool
fn eq(&self, other: &VerifierError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &VerifierError) -> bool
fn ne(&self, other: &VerifierError) -> bool
This method tests for !=
.
impl Eq for VerifierError
impl StructuralEq for VerifierError
impl StructuralPartialEq for VerifierError
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.