Skip to main content

ValidationError

Enum ValidationError 

Source
pub enum ValidationError {
Show 16 variants ControlFlowRequiresFeedForward { pc: usize, mnemonic: &'static str, }, MultipleMeasuresRequireFeedForward { pc: usize, }, FillRequiresAtomReloading { pc: usize, }, InvalidLocation { pc: usize, message: String, }, InvalidLane { pc: usize, message: String, }, InvalidZone { pc: usize, message: String, }, NewArrayZeroDim0 { pc: usize, }, NewArrayInvalidTypeTag { pc: usize, type_tag: u32, }, InitialFillNotFirst { pc: usize, }, EmptyProgram, MissingTerminator { pc: usize, }, UnreachableInstruction { pc: usize, }, StackUnderflow { pc: usize, }, TypeMismatch { pc: usize, expected: u8, got: u8, }, LocationGroupValidation { pc: usize, error: LocationGroupError, }, LaneGroupValidation { pc: usize, error: LaneGroupError, },
}
Expand description

An arch-dependent validation failure, tagged with the offending instruction’s program counter.

Variants§

§

ControlFlowRequiresFeedForward

A CPU control-flow instruction appears but feed_forward is disabled.

Fields

§mnemonic: &'static str

The offending mnemonic (e.g. "cond_br").

§

MultipleMeasuresRequireFeedForward

More than one measure appears but feed_forward is disabled.

Fields

§

FillRequiresAtomReloading

A fill appears but atom_reloading is disabled.

Fields

§

InvalidLocation

A const_loc operand does not name a valid location in the arch spec.

Fields

§message: String
§

InvalidLane

A const_lane operand does not name a valid lane in the arch spec.

Fields

§message: String
§

InvalidZone

A const_zone operand does not name a valid zone in the arch spec.

Fields

§message: String
§

NewArrayZeroDim0

new_array dim0 must be greater than zero.

Fields

§

NewArrayInvalidTypeTag

new_array type_tag exceeds the maximum value tag.

Fields

§type_tag: u32
§

InitialFillNotFirst

initial_fill is not the first non-constant instruction.

Fields

§

EmptyProgram

The program has no instructions (and therefore no terminator).

§

MissingTerminator

The final instruction is neither return nor halt.

Fields

§

UnreachableInstruction

An instruction follows a return/halt and is unreachable.

Fields

§

StackUnderflow

An instruction popped from an empty stack.

Fields

§

TypeMismatch

A popped value had the wrong type tag (see tag).

Fields

§expected: u8
§got: u8
§

LocationGroupValidation

A local_r/local_rz/fill/initial_fill location group is invalid.

§

LaneGroupValidation

A move lane group is invalid (duplicate, inconsistent, AOD, …).

Fields

Trait Implementations§

Source§

impl Clone for ValidationError

Source§

fn clone(&self) -> ValidationError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ValidationError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ValidationError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ValidationError

1.30.0 · Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for ValidationError

Source§

fn eq(&self, other: &ValidationError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for ValidationError

Source§

impl StructuralPartialEq for ValidationError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<'src, T> IntoMaybe<'src, T> for T
where T: 'src,

§

type Proj<U: 'src> = U

§

fn map_maybe<R>( self, _f: impl FnOnce(&'src T) -> &'src R, g: impl FnOnce(T) -> R, ) -> <T as IntoMaybe<'src, T>>::Proj<R>
where R: 'src,

§

impl<'p, T> Seq<'p, T> for T
where T: Clone,

§

type Item<'a> = &'a T where T: 'a

The item yielded by the iterator.
§

type Iter<'a> = Once<&'a T> where T: 'a

An iterator over the items within this container, by reference.
§

fn seq_iter(&self) -> <T as Seq<'p, T>>::Iter<'_>

Iterate over the elements of the container.
§

fn contains(&self, val: &T) -> bool
where T: PartialEq,

Check whether an item is contained within this sequence.
§

fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>
where 'p: 'b,

Convert an item of the sequence into a [MaybeRef].
§

impl<T> Themed for T
where T: Display,

§

fn ty(&self) -> Decorated<'_, Self>

§

fn target(&self) -> Decorated<'_, Self>

§

fn keyword(&self) -> Decorated<'_, Self>

§

fn symbol(&self) -> Decorated<'_, Self>

§

fn at_symbol(&self) -> Decorated<'_, Self>

§

fn comment(&self) -> Decorated<'_, Self>

§

fn instruction(&self) -> Decorated<'_, Self>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> OrderedSeq<'_, T> for T
where T: Clone,