pub enum ExpectedFailKeyPart {
Named {
index: IndexTypeRef,
variant: IndexVariantName,
source_index_path: Option<NamePath>,
span: Span,
},
RangeStep {
step: u64,
span: Span,
},
}Expand description
One axis segment in a per-variant #[expected_fail(...)] key.
Variants§
Named
An Index.Variant / module.Index.Variant segment for a named axis.
The index carrier is the semantic key used by runtime assertion
checks. Before module-aware TIR resolution, source_index_path
preserves the structured syntax path. After resolution, index
carries the canonical owner used by runtime checks.
RangeStep
A #N segment for a Nat range axis (#816).
Range axes have no source-level index name, so the axis identity is positional: the segment binds to the assertion’s axis at the same tuple position, validated at dim-check time.
Implementations§
Source§impl ExpectedFailKeyPart
impl ExpectedFailKeyPart
pub fn unresolved( index_path: NamePath, variant: IndexVariantName, span: Span, ) -> Self
pub fn with_owner( owner: DagId, index: IndexName, variant: IndexVariantName, span: Span, ) -> Self
pub fn resolved(resolved: ResolvedIndexVariant, span: Span) -> Self
pub fn with_resolved_variant(&self, resolved: ResolvedIndexVariant) -> Self
Sourcepub const fn named_index(&self) -> Option<&IndexTypeRef>
pub const fn named_index(&self) -> Option<&IndexTypeRef>
The named index reference, when this segment targets a named axis.
Sourcepub const fn source_index_path(&self) -> Option<&NamePath>
pub const fn source_index_path(&self) -> Option<&NamePath>
The structured syntax path awaiting resolution, for named segments.
Sourcepub fn variant(&self) -> IndexVariantName
pub fn variant(&self) -> IndexVariantName
The variant key this segment selects within its axis.
Sourcepub fn matches_entry(
&self,
index: &IndexTypeRef,
variant: &IndexVariantName,
) -> bool
pub fn matches_entry( &self, index: &IndexTypeRef, variant: &IndexVariantName, ) -> bool
Whether this segment selects the given entry of an indexed value.
Named segments require the entry’s index identity to match; #N
segments match the #N entry of any Nat range axis (the axis itself
was bound positionally at dim-check time).
Trait Implementations§
Source§impl Clone for ExpectedFailKeyPart
impl Clone for ExpectedFailKeyPart
Source§fn clone(&self) -> ExpectedFailKeyPart
fn clone(&self) -> ExpectedFailKeyPart
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExpectedFailKeyPart
impl Debug for ExpectedFailKeyPart
impl Eq for ExpectedFailKeyPart
Source§impl PartialEq for ExpectedFailKeyPart
impl PartialEq for ExpectedFailKeyPart
Source§fn eq(&self, other: &ExpectedFailKeyPart) -> bool
fn eq(&self, other: &ExpectedFailKeyPart) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExpectedFailKeyPart
Auto Trait Implementations§
impl Freeze for ExpectedFailKeyPart
impl RefUnwindSafe for ExpectedFailKeyPart
impl Send for ExpectedFailKeyPart
impl Sync for ExpectedFailKeyPart
impl Unpin for ExpectedFailKeyPart
impl UnsafeUnpin for ExpectedFailKeyPart
impl UnwindSafe for ExpectedFailKeyPart
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
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
key and return true if they are equal.