diff options
| author | dianne <diannes.gm@gmail.com> | 2025-05-19 23:18:08 -0700 |
|---|---|---|
| committer | dianne <diannes.gm@gmail.com> | 2025-05-19 23:18:08 -0700 |
| commit | c343b2a47c29bdfe4c611ba74f9c9e455f12539b (patch) | |
| tree | d056118e05e6dd360f3c1918bc275860c17f74a2 /compiler/rustc_pattern_analysis/src/errors.rs | |
| parent | e42bbfe1f7c26f8760a99c4b1f27d33aba1040bb (diff) | |
| download | rust-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
