Skip to main content

Module lowering

Module lowering 

Source
Expand description

MIR lowering: AST -> MIR.

Converts Shape AST function bodies into MIR basic blocks. This is the bridge between parsing and borrow analysis.

§Module structure

  • mod.rs – Public API (lower_function, lower_function_detailed, compute_mutability_errors), MirBuilder struct and its state machine.
  • [expr] – Expression lowering (lower_expr_to_temp and its many helpers).
  • [stmt] – Statement lowering (variable decls, assignments, control flow, pattern destructuring).
  • [helpers] – Shared utilities: generic container store emission, operand collection, place projection, type inference from expressions.

Structs§

LoweredBindingInfo
MirBuilder
Builder for constructing a MIR function from AST.
MirLoweringResult

Functions§

compute_mutability_errors
lower_function
Lower a function body (list of statements) into MIR.
lower_function_detailed
Lower a function body (list of statements) into MIR.