pub fn detect(
unit: &FnUnit<'_>,
imports: &Imports,
module_bindings: &HashSet<String>,
span: &SpanIndex<'_>,
) -> Vec<(Effect, bool)>Expand description
Detect mutation effects in unit’s own body, with escape analysis.
Returns (Effect, contained) pairs. The bool is the containment flag —
true means the write is bounded to this function’s scope (local init or
constructor init); false means it escapes.
Task 9 consumes the contained flags to apply boundary-containment discounts.