-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename bool::then_*
to bool::to_option_*
and use where appropriate
#65195
Conversation
r? @zackmdavis (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
I think in some places you use |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@zackmdavis seems busy. r? @Centril |
} else { | ||
None | ||
} | ||
valid_unit.to_option(Uniform { unit, total: arg.layout.size }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen the same logic (up to RegKind::Vector =>
) 4 times now so it might be worth de-duplicating that with a function somewhere.
Let's just make sure perf doesn't regress anywhere. @bors try @rust-timer queue |
Awaiting bors try build completion |
Rename `bool::then_*` to `bool::to_option_*` and use where appropriate Name change following rust-lang/rfcs#2757. Also try it out throughout the compiler in places I think makes the code more readable.
☀️ Try build successful - checks-azure |
Queued d998a73 with parent 857a55b, future comparison URL. |
Finished benchmarking try commit d998a73, comparison URL. |
This is blocked on the discussion in rust-lang/rfcs#2757. |
@varkor Can you please implement @dtolnay's comment in rust-lang/rfcs#2757 (comment)? |
@bors r+ |
📌 Commit f1db60c has been approved by |
Rename `bool::then_*` to `bool::to_option_*` and use where appropriate Name change following rust-lang/rfcs#2757. Also try it out throughout the compiler in places I think makes the code more readable.
☀️ Test successful - checks-azure |
Name change following rust-lang/rfcs#2757. Also try it out throughout the compiler in places I think makes the code more readable.