Enum rustc_const_eval::interpret::validity::PathElem [−][src]
pub enum PathElem {
Field(Symbol),
Variant(Symbol),
GeneratorState(VariantIdx),
CapturedVar(Symbol),
ArrayElem(usize),
TupleElem(usize),
Deref,
EnumTag,
GeneratorTag,
DynDowncast,
}
Expand description
We want to show a nice path to the invalid field for diagnostics,
but avoid string operations in the happy case where no error happens.
So we track a Vec<PathElem>
where PathElem
contains all the data we
need to later print something for the user.
Variants
Field(Symbol)
Tuple Fields of Field
0: Symbol
Variant(Symbol)
Tuple Fields of Variant
0: Symbol
GeneratorState(VariantIdx)
Tuple Fields of GeneratorState
0: VariantIdx
CapturedVar(Symbol)
Tuple Fields of CapturedVar
0: Symbol
ArrayElem(usize)
Tuple Fields of ArrayElem
0: usize
TupleElem(usize)
Tuple Fields of TupleElem
0: usize
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PathElem
impl UnwindSafe for PathElem
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes
Size for each variant:
Field
: 4 bytesVariant
: 4 bytesGeneratorState
: 4 bytesCapturedVar
: 4 bytesArrayElem
: 12 bytesTupleElem
: 12 bytesDeref
: 0 bytesEnumTag
: 0 bytesGeneratorTag
: 0 bytesDynDowncast
: 0 bytes