about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/errors.rs
diff options
context:
space:
mode:
authordianne <diannes.gm@gmail.com>2025-05-19 23:18:08 -0700
committerdianne <diannes.gm@gmail.com>2025-05-19 23:18:08 -0700
commitc343b2a47c29bdfe4c611ba74f9c9e455f12539b (patch)
treed056118e05e6dd360f3c1918bc275860c17f74a2 /compiler/rustc_pattern_analysis/src/errors.rs
parente42bbfe1f7c26f8760a99c4b1f27d33aba1040bb (diff)
downloadrust-c343b2a47c29bdfe4c611ba74f9c9e455f12539b.tar.gz
rust-c343b2a47c29bdfe4c611ba74f9c9e455f12539b.zip
`gather_locals`: only visit guard pattern guards when checking the guard
When checking a pattern with guards in it, `GatherLocalsVisitor` will
visit both the pattern (when type-checking the let, arm, or param
containing it) and the guard expression (when checking the guard
itself). This keeps it from visiting the guard when visiting the
pattern, since otherwise it would gather locals from the guard twice,
which would lead to a delayed bug: "evaluated expression more than
once".
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/errors.rs')
0 files changed, 0 insertions, 0 deletions