about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/constructor.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-03-07 18:32:49 +0100
committerGitHub <noreply@github.com>2024-03-07 18:32:49 +0100
commit57aea3811eb6a30141ad0b8de1ece04421db56e9 (patch)
tree50a97a4ffc0e52ca98a1f1e70675e78faf8532a4 /compiler/rustc_pattern_analysis/src/constructor.rs
parentfcb2cbc08f206de0c3bba85faa321e6cdf1dc22f (diff)
parent570376c49647d8565a639e9e190916fe2246c26f (diff)
downloadrust-57aea3811eb6a30141ad0b8de1ece04421db56e9.tar.gz
rust-57aea3811eb6a30141ad0b8de1ece04421db56e9.zip
Rollup merge of #122137 - Zalathar:if-break-scope, r=matthewjasper
Don't pass a break scope to `Builder::break_for_else`

This method would previously take a target scope, and then verify that it was equal to the scope on top of the if-then scope stack.

In practice, this means that callers have to go out of their way to pass around redundant scope information that's already on the if-then stack.

So it's easier to just retrieve the correct scope directly from the if-then stack, and simplify the other code that was passing it around.

---

Both ways of indicating the break target were introduced in #88572. I haven't been able to find any strong indication of whether this was done deliberately, or whether it was just an implementation artifact. But to me it doesn't seem useful to carefully pass around the same scope in two different ways.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/constructor.rs')
0 files changed, 0 insertions, 0 deletions