Skip to main content

inline_value_sites

Function inline_value_sites 

Source
pub fn inline_value_sites(
    locals: &[LocalBinding],
    visible: Span,
    stopped: Span,
    scaffold_names: Option<&HashSet<String>>,
) -> Vec<InlineValueSite>
Expand description

The bindings whose value to show at stopped: each local declared inside visible and still in scope where the debugger is paused, named as the emitter names it (bynk_check::emitted_names). A binding whose emitted name is not knowable from the source (a re-let) is left out rather than guessed, so a value is never shown against the wrong variable.

scaffold_names is Some for a suite file: the emitter gives a let a fresh name when the test scaffold already binds its name, and which names the scaffold binds is not visible here. So a let there is also left out when its name is one the project declares (scaffold_names, a superset of what a scaffold can destructure) or another local in the file reuses it (a for all binder or history run variable).