about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/osstring-to-string.js
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-01 17:51:30 +0100
committerGitHub <noreply@github.com>2024-03-01 17:51:30 +0100
commit1a4c93e3ed9b0977707a384e134619ba22a360b7 (patch)
treeb75cd049dc7cb56b798f5da210d5717ffa465fc6 /tests/rustdoc-js-std/osstring-to-string.js
parent90ca049320b4bdff08e97a70ac978f1ad126780e (diff)
parenta7832b14b14e1af2e1e8a2cbf56b5b797892bee3 (diff)
downloadrust-1a4c93e3ed9b0977707a384e134619ba22a360b7.tar.gz
rust-1a4c93e3ed9b0977707a384e134619ba22a360b7.zip
Rollup merge of #121784 - Zalathar:if-or-converge, r=Nadrieril
Make the success arms of `if lhs || rhs` meet up in a separate block

Extracted from #118305, where this is necessary to avoid introducing a bug when injecting marker statements into the then/else arms.

---

In the previous code (#111752), the success block of `lhs` would jump directly to the success block of `rhs`. However, `rhs_success_block` could already contain statements that are specific to the RHS, and the direct goto causes them to be executed in the LHS success path as well.

This patch therefore creates a fresh block that the LHS and RHS success blocks can both jump to.

---

I think the reason we currently get away with this is that `rhs_success_block` usually doesn't contain anything other than StorageDead statements for locals used by the RHS, and those statements don't seem to cause problems in the LHS success path (which never makes those locals live).

But if we start adding meaningful statements for branch coverage (or MC/DC coverage), it's important to keep the LHS and RHS blocks separate.
Diffstat (limited to 'tests/rustdoc-js-std/osstring-to-string.js')
0 files changed, 0 insertions, 0 deletions