Skip to main content

unit_table_uses_emit

Function unit_table_uses_emit 

Source
pub fn unit_table_uses_emit(
    table: &UnitTable,
    callees: Option<&HashMap<ExprId, Callee>>,
) -> bool
Expand description

Events track, slice 0 (spine #936): does any handler or provider op in this unit emit? Reads the checker’s own resolved Callee for every expression in every service handler, agent handler and provider op, not the receiver’s spelling, so a local type that shadows Events does not count (1204_events_emit_shadowed_by_local_type).

callees is None only for a unit whose own check never ran. Every caller runs on an otherwise-clean program, where every unit was checked, and a silent false would disable the emitter’s events wiring with no diagnostic, so it is a debug_assert rather than a quiet default.