pub struct AbstractConstBuilder<'a, 'tcx> {
    tcx: TyCtxt<'tcx>,
    body_id: ExprId,
    body: &'a Thir<'tcx>,
    nodes: IndexVec<NodeId, Node<'tcx>>,
}

Fields§

§tcx: TyCtxt<'tcx>§body_id: ExprId§body: &'a Thir<'tcx>§nodes: IndexVec<NodeId, Node<'tcx>>

The current WIP node tree.

Implementations§

We do not allow all binary operations in abstract consts, so filter disallowed ones.

While we currently allow all unary operations, we still want to explicitly guard against future changes here.

Builds the abstract const by walking the thir and bailing out when encountering an unsupported operation.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

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: 48 bytes