Skip to content

LivenessValues: use Either rather than mutually exclusive Options#157035

Open
amandasystems wants to merge 1 commit into
rust-lang:mainfrom
amandasystems:region-values-either
Open

LivenessValues: use Either rather than mutually exclusive Options#157035
amandasystems wants to merge 1 commit into
rust-lang:mainfrom
amandasystems:region-values-either

Conversation

@amandasystems
Copy link
Copy Markdown
Contributor

I was reading through LivenessValues and realised it had a lot of comments explaining that two Options were mutually exclusive, plus some redundant logic to handle this.

This is a drive-by fix to use an Either instead, which makes that property obvious from the code. It also removes the repeated logic.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 27, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 27, 2026

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: borrowck, compiler
  • borrowck, compiler expanded to 73 candidates
  • Random selection from 18 candidates

@amandasystems amandasystems marked this pull request as draft May 27, 2026 19:40
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 27, 2026
@amandasystems amandasystems force-pushed the region-values-either branch from a5b704b to 04c1272 Compare May 27, 2026 19:53
@amandasystems amandasystems force-pushed the region-values-either branch from 04c1272 to e8beadf Compare May 27, 2026 20:02
@amandasystems amandasystems marked this pull request as ready for review May 27, 2026 20:04
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 27, 2026
@amandasystems
Copy link
Copy Markdown
Contributor Author

Sorry, read through the diff AGAIN and of course noticed a few mistakes I hadn't seen in the terminal window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants