CodeQL library for Rust
codeql/rust-all 0.2.27 (changelog, source)
Search

Predicate signature LocalNameBindingInputSig::isUnscopedConditional

Holds if local declarations in a branch of cond are in scope in the remainder of the branch and following the conditional itself.

Example:

#if DEBUG
    let x = def1
    // x is in scope here and refers to `def1`
#else
    let x = def2
    // x is in scope here and refers to `def2`
#endif
// x is in scope here and refers to either `def1` or `def2`
signature predicate isUnscopedConditional(Conditional cond)