Struct rustc_trait_selection::traits::const_evaluatable::AbstractConstBuilder [−][src]
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: ExprIdbody: &'a Thir<'tcx>nodes: IndexVec<NodeId, Node<'tcx>>The current WIP node tree.
Implementations
fn new(
tcx: TyCtxt<'tcx>,
(body, body_id): (&'a Thir<'tcx>, ExprId)
) -> Result<Option<AbstractConstBuilder<'a, 'tcx>>, ErrorReported>
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 unspported operation.
Auto Trait Implementations
impl<'a, 'tcx> !RefUnwindSafe for AbstractConstBuilder
impl<'a, 'tcx> !Send for AbstractConstBuilder
impl<'a, 'tcx> !Sync for AbstractConstBuilder
impl<'a, 'tcx> Unpin for AbstractConstBuilder where
'tcx: 'a,
impl<'a, 'tcx> !UnwindSafe for AbstractConstBuilder
Blanket Implementations
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
