about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/snippet.rs
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2020-10-22 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2020-10-26 10:33:39 +0100
commita6b64be8b51d680ca8185e519be81937c1a98ed0 (patch)
tree43204d3b708d77a6f994cc7e1603a98d324798dc /compiler/rustc_errors/src/snippet.rs
parent11269536e294a497b9991382cc9afda1b6ab9de0 (diff)
downloadrust-a6b64be8b51d680ca8185e519be81937c1a98ed0.tar.gz
rust-a6b64be8b51d680ca8185e519be81937c1a98ed0.zip
simplify-locals: Unify use count visitors
The simplify locals implementation uses two different visitors to update
the locals use counts. The DeclMarker calculates the initial use counts.
The StatementDeclMarker updates the use counts as statements are being
removed from the block.

Replace them with a single visitor that can operate in either mode,
ensuring consistency of behaviour.

Additionally use exhaustive match to clarify what is being optimized.

No functional changes intended.
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
0 files changed, 0 insertions, 0 deletions