pub struct LoweringContext<'db> {
    pub db: &'db dyn LoweringGroup,
    pub function_def: &'db FreeFunctionDefinition,
    pub signature: &'db Signature,
    pub may_panic: bool,
    pub diagnostics: LoweringDiagnostics,
    pub variables: Arena<Variable>,
    pub blocks: StructuredBlocks,
    pub semantic_defs: UnorderedHashMap<VarId, Variable>,
    pub ref_params: &'db [VarId],
    pub implicits: &'db [TypeId],
    pub lookup_context: ImplLookupContext,
    pub expr_formatter: ExprFormatter<'db>,
}
Expand description

Context for the lowering phase of a free function.

Fields§

§db: &'db dyn LoweringGroup§function_def: &'db FreeFunctionDefinition

Semantic model for current function definition.

§signature: &'db Signature§may_panic: bool

Whether the current function may panic.

§diagnostics: LoweringDiagnostics

Current emitted diagnostics.

§variables: Arena<Variable>

Arena of allocated lowered variables.

§blocks: StructuredBlocks

Lowered blocks of the function.

§semantic_defs: UnorderedHashMap<VarId, Variable>

Definitions encountered for semantic variables.

§ref_params: &'db [VarId]§implicits: &'db [TypeId]§lookup_context: ImplLookupContext§expr_formatter: ExprFormatter<'db>

Implementations§

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.