]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #106699 - eholk:await-chains-drop-tracking, r=wesleywiser
authorMatthias Krüger <matthias.krueger@famsik.de>
Fri, 20 Jan 2023 06:25:27 +0000 (07:25 +0100)
committerGitHub <noreply@github.com>
Fri, 20 Jan 2023 06:25:27 +0000 (07:25 +0100)
commit3d79cbc3c1cf6fadeff32c30a8e20d456cd625fe
treefb3d5a24762ec9f4803fa54b1f091d06c9736597
parent51d50ea96ecc9c681a0054e5eb8e5e1d4ab38906
parentd32f3fe14ecab069ceebe73063061f6aef05c217
Rollup merge of #106699 - eholk:await-chains-drop-tracking, r=wesleywiser

[drop tracking] Visit break expressions

This fixes https://github.com/rust-lang/rust/issues/102383 by remembering to visit the expression in `break expr` when building the drop tracking CFG. Missing this step was causing an off-by-one error which meant after a number of awaits we'd be
looking for dropped values at the wrong point in the code.

Additionally, this changes the order of traversal for assignment expressions to visit the rhs and then the lhs. This matches what is done elsewhere.

Finally, this improves some of the debugging output (for example, the CFG visualizer) to make it easier to figure out these sorts of issues.