pub fn analyze_unit(
unit: &FnUnit<'_>,
path: &str,
imports: &Imports,
module_bindings: &HashSet<String>,
span: &SpanIndex<'_>,
) -> HotspotExpand description
Analyze one function-unit into an owned Hotspot.
ยงGather โ Fold
- gather: drive each detector over the own body to collect
Vec<Effect>. - fold: compute
own_score,max_class, function-levelconfidence(weakest-link min over per-effect confidences, plus 0.8 synthetic when there are unresolved awaited calls), andawait_count/async_boundary.
Adding a detector is a one-line addition to the gather step (in [gather]).