Skip to main content

PassReport

Enum PassReport 

Source
pub enum PassReport {
Show 14 variants Tco { tail_calls_added: usize, fns_changed: Vec<FnCountChange>, non_tail_recursive: Vec<NonTailEntry>, }, Typecheck { items_checked: usize, errors: usize, error_messages: Vec<String>, }, InterpLower { interpolations_lowered: usize, fns_changed: Vec<FnCountChange>, }, BufferBuild(BufferBuildPassReport), Resolve { slots_resolved: usize, fns_with_slots: usize, slot_types_total: usize, slot_types_invalid: usize, }, LastUse { last_use_marked: usize, total_resolved: usize, }, Analyze { total_fns: usize, no_alloc_fns: usize, recursive_fns: usize, mutual_tco_members: usize, unknown_alloc: usize, }, Escape { rewrites: usize, }, RefinementLower { refined_types: usize, }, IntervalAnalyze { types_analyzed: usize, two_sided_bounded: usize, ops_overflow_free: usize, ops_needs_wider: usize, ops_unbounded: usize, raw_i64_eligible: usize, }, ContractLower { fn_contracts: usize, }, LawLower { law_theorems: usize, }, BuildSymbols { fns: usize, types: usize, ctors: usize, modules: Vec<BuildSymbolsModule>, fn_name_collisions: usize, type_name_collisions: usize, }, NameResolve { promoted_fns: usize, passthrough_items: usize, unresolved_count: usize, },
}
Expand description

Typed per-pass report. Each variant carries the structured facts a CI gate cares about — counts, fn names, error messages — so scripts don’t have to regex-parse human-readable summaries. The text and JSON renderers in cmd_explain_passes derive their output from these values.

Variants§

§

Tco

Fields

§tail_calls_added: usize

Total tail-call rewrites this pass made.

§fns_changed: Vec<FnCountChange>

Per-fn before/after, alphabetised by name.

§non_tail_recursive: Vec<NonTailEntry>

Recursive callsites that did NOT convert (still call the fn in non-tail position). Empty when the pass was clean.

§

Typecheck

Fields

§items_checked: usize
§errors: usize
§error_messages: Vec<String>

Up to the first 5 error messages (full list still on PipelineResult.typecheck).

§

InterpLower

Fields

§interpolations_lowered: usize
§fns_changed: Vec<FnCountChange>

Per-fn before/after counts for fns whose interpolation count dropped during the pass.

§

BufferBuild(BufferBuildPassReport)

§

Resolve

Fields

§slots_resolved: usize
§fns_with_slots: usize
§slot_types_total: usize

Total slot count across all fns whose resolver populated a type (one entry per FnResolution.local_slot_types element).

§slot_types_invalid: usize

Slots whose type came back Type::Invalid — typically wildcards / _ patterns the resolver counted but never produced into. Surfaces unhandled pattern shapes (e.g. future variant kinds the slot-types pass hasn’t taught itself yet) as a non-zero counter.

§

LastUse

Fields

§last_use_marked: usize
§total_resolved: usize
§

Analyze

Fields

§total_fns: usize
§no_alloc_fns: usize
§recursive_fns: usize
§mutual_tco_members: usize
§unknown_alloc: usize

Fns whose allocates is None because no alloc_policy was configured. Surfaces a misconfigured pipeline run.

§

Escape

Fields

§rewrites: usize

How many FnCall(callee, [RecordCreate{…}]) sites the pass rewrote into the inlined-and-substituted body.

§

RefinementLower

Fields

§refined_types: usize

User types lifted into refinement subtypes (records with a single carrier field + matching smart constructor).

§

IntervalAnalyze

Fields

§types_analyzed: usize

Refined types the interval analysis saw.

§two_sided_bounded: usize

Of those, how many yielded a two-sided constant interval (both bounds finite) — the carrier-lowering candidates.

§ops_overflow_free: usize

Arithmetic ops whose intermediate provably fits i64 (guard still required — see OpClass::OverflowFree).

§ops_needs_wider: usize

Ops whose intermediate exceeds i64 but is finite.

§ops_unbounded: usize

Ops with no derivable finite bound (one-sided / plain-Int operands).

§raw_i64_eligible: usize

Refined types eligible for a raw i64 carrier — two-sided, i64-fitting interval with every op OverflowFree. The recognizer slice’s headline count; a pure diagnostic with no downstream consumer yet.

§

ContractLower

Fields

§fn_contracts: usize

Pure fns with a non-trivial RecursionContract. Currently only covers the IntCountdownGuarded shape; extends as more RecursionPlan variants migrate into ProofIR.

§

LawLower

Fields

§law_theorems: usize

Verify-law theorems lowered. Each entry pairs (fn, law) with quantifiers + premises + claim.

§

BuildSymbols

Fields

§fns: usize

Total fn declarations across entry + dep modules.

§types: usize

Total type declarations across entry + dep modules.

§ctors: usize

Total constructors (record + sum variants) across all type declarations.

§modules: Vec<BuildSymbolsModule>

Per-module breakdown (entry first, then deps in walk order). Shows where each fn/type lives — useful for “is this big project actually multi-module?” sanity checks at a glance.

§fn_name_collisions: usize

Number of bare fn names that occur in 2+ different scopes (e.g. entry + Module, or Module.A + Module.B). Under bare-name keying these would have silently merged; opaque FnId keeps them distinct. Zero would mean phase E migration had no practical effect on this project — non-zero is the proof it did.

§type_name_collisions: usize

Same for type names.

§

NameResolve

Fields

§promoted_fns: usize

Top-level fn definitions promoted to crate::ir::hir::ResolvedFnDef. One per FnDef that resolved through the symbol table.

§passthrough_items: usize

Top-level items kept as crate::ir::hir::ResolvedTopLevel::Passthrough (verify blocks, decisions, type defs, top-level stmts, and any fn whose name didn’t resolve — typechecker error recovery). The fewer of these, the more the resolved HIR captured.

§unresolved_count: usize

Resolver-escape-hatch occurrences in the resolved tree — ResolvedCallee::Unresolved and ResolvedCtor::Unresolved summed across every expression. The contract for backends that consume resolved_items is zero unresolved for well-typed programs; non-zero implies either a typechecker error already reported (the resolver bailed to recovery shape) or a resolver gap that needs patching. CI gates can compare this count against the typecheck error count to catch silent resolver regressions.

Trait Implementations§

Source§

impl Clone for PassReport

Source§

fn clone(&self) -> PassReport

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PassReport

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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