diff options
| author | Eric Wu <eric.dianhao.wu@gmail.com> | 2022-12-16 10:22:29 -0500 |
|---|---|---|
| committer | Eric Wu <eric.dianhao.wu@gmail.com> | 2022-12-16 10:54:12 -0500 |
| commit | 97c12e0460270bd6b0a6d52b8677f24c5b2d6879 (patch) | |
| tree | 8c3d465602b5fc9df6a871114be1143b502d725f /library/std/src/sys/unix/stack_overflow.rs | |
| parent | 02f3959f2bc4bd972add6f0c33df90aab808dc7d (diff) | |
| download | rust-97c12e0460270bd6b0a6d52b8677f24c5b2d6879.tar.gz rust-97c12e0460270bd6b0a6d52b8677f24c5b2d6879.zip | |
fix logic in IncrementVisitor
There used to be a logical bug where IncrementVisitor would completely stop checking an expression/block after seeing a continue statement. This led to issue #10058 where a variable incremented (or otherwise modified) after any continue statement would still be considered incremented only once. The solution is to continue scanning the expression after seeing a `continue` statement, but increment self.depth so that the Visitor thinks that the rest of the loop is within a conditional.
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
