mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
4daa43aaff
match lowering: test one or pattern at a time This is a bit more opinionated than the previous PRs. On the face of it this is less efficient and more complex than before, but I personally found the loop that digs into `leaf_candidates` on each iteration very confusing. Instead this does "generate code for this or-pattern" then "generate further code for each branch if needed" in two steps. Incidentally this way we don't _require_ or patterns to be sorted at the end. It's still an important optimization but I find it clearer to not rely on it for correctness. r? `@matthewjasper` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |