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

Predicate Impl::variableDecl

Holds if name declares a variable named text at definingNode. Normally, definingNode = name, except in cases like

match either {
    Either::Left(x) | Either::Right(x) => println!(x),
}

where definingNode is the entire Either::Left(x) | Either::Right(x) pattern.

Import path

import codeql.rust.elements.internal.VariableImpl
predicate variableDecl(AstNode definingNode, Name name, string text)