about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-19 16:07:40 +0000
committerbors <bors@rust-lang.org>2022-12-19 16:07:40 +0000
commit1f74b1b04ecc78e89e5587068d4fc0d0dc118b31 (patch)
treece86d86844ade1f7d6aa6384046af726aa518a01 /src/test/codegen/src-hash-algorithm
parent9ed1829f1fb61695c21474361ec23b9976793b73 (diff)
parentc110481dd466f4e09e219182089e20e9fa93159f (diff)
downloadrust-1f74b1b04ecc78e89e5587068d4fc0d0dc118b31.tar.gz
rust-1f74b1b04ecc78e89e5587068d4fc0d0dc118b31.zip
Auto merge of #13794 - jonas-schievink:reset-step-limit-after-bump, r=jonas-schievink
fix: fix "parser seems stuck" panic when parsing colossal files

The parser step count is incremented every time the parser inspects a token. It's purpose is to ensure the parser doesn't get stuck in infinite loops. But since `self.pos` grows monotonically when parsing source code, it gives a better idea for whether the parser is stuck or not: if `self.pos` is changed, we know that the parser cannot be stuck, so it is safe to reset the step count to 0. This makes the limit check scale with the size of the file, and so should fix https://github.com/rust-lang/rust-analyzer/issues/13788.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions