Skip to main content

has_shared_locals

Function has_shared_locals 

Source
fn has_shared_locals<'hir>(
    hir: &'hir Hir<'hir>,
    before: &'hir [Stmt<'hir>],
    after: &'hir [Stmt<'hir>],
) -> bool
Expand description

Returns true if a local variable declared in the before segment is referenced in the after segment.

Only top-level declarations need to be tracked: declarations nested inside blocks, loops, or try clauses are scoped to them and cannot be referenced after the placeholder.