about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorEric Wu <eric.dianhao.wu@gmail.com>2022-12-16 10:22:29 -0500
committerEric Wu <eric.dianhao.wu@gmail.com>2022-12-16 10:54:12 -0500
commit97c12e0460270bd6b0a6d52b8677f24c5b2d6879 (patch)
tree8c3d465602b5fc9df6a871114be1143b502d725f /library/std/src/sys/unix/stack_overflow.rs
parent02f3959f2bc4bd972add6f0c33df90aab808dc7d (diff)
downloadrust-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