Skip to main content

LayoutError

Enum LayoutError 

Source
pub enum LayoutError {
    UnsupportedMemberKind(SymbolKind, String),
    UnsupportedType(String),
    NonConstantCheckerOutputInitial(String),
}
Expand description

The loud, typed error this and every later layout task returns instead of silently skipping a member kind this plan claims to handle (ARCHITECTURE §7 item 9 applied to SymbolKind).

Deviation from the plan’s literal sym. call-site restriction: the plan’s Task 4 prose says build_template_layout touches no Symbol method outside {members, kind, value_type, initializer}, but this variant’s own field is documented as “a hierarchical-ish name for diagnosis”, and ST-126’s own ledger text lists Symbol::name() as part of STATE’s allowed hierarchy-walking API surface. name() is called only on this (in practice unreachable this wave, since a real Variable/ Net/Port symbol always yields a value_type()) diagnostic path, never on the per-member happy path.

Variants§

§

UnsupportedMemberKind(SymbolKind, String)

A member this builder’s kind-filter does accept (Variable/Net/ Port) but that itself failed to yield a queryable value – e.g. Symbol::value_type() returning None for a symbol the filter otherwise believed was a value. Carries the offending kind and a hierarchical-ish name for diagnosis. Never constructed for a kind the filter excludes on purpose (ST-072’s exclusion is not an error).

§

UnsupportedType(String)

Task 6: a member whose value_type()/port_type() shape this builder cannot yet lay out – a dynamic array, queue, or associative array (rejected by the explicit Type::is_dynamically_sized_array() predicate check, never inferred from another predicate being false); a class handle, string, chandle, event, virtual interface, a multi-dimensional fixed unpacked array (whose per-row element is itself another unpacked array), or a real/shortreal/realtime (review fix r1 rejected the first three via bit_width() == 0; review fix r3 replaced that with the more general !is_integral() gate – real/shortreal/realtime have a NONZERO bit_width() (64/32/64, per Type::getBitWidth) despite having no floating-point representation implemented this wave, so the old zero-width test alone let them fall through into ordinary 4-state slot machinery with a silently dropped initializer; is_integral() is false for every one of these shapes and true for everything this wave does support, so one gate now gets both); or an otherwise-supported integral member whose bit width does not fit u16 (review fix r3: previously silently clamped to u16::MAX instead of rejected, which for a Wide scalar also undersized the arena allocation itself, since word_count was derived from the clamped value). Carries a hierarchical-ish name for diagnosis. A loud Err, never a guessed slot or a panic reading a nonexistent fixed bound.

§

NonConstantCheckerOutputInitial(String)

A checker output formal whose initial value (output int ctr = x;, LRM 17.2) is not a constant: it is evaluated in the instantiation’s context, and only a constant one is lowered – rejected rather than left at the type’s default.

Trait Implementations§

Source§

impl Debug for LayoutError

Source§

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

Formats the value using the given formatter. Read more

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V