Rename bool::then_* to bool::to_option_* and use where appropriate#65195
Rename bool::then_* to bool::to_option_* and use where appropriate#65195bors merged 8 commits intorust-lang:masterfrom
bool::then_* to bool::to_option_* and use where appropriate#65195Conversation
|
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.
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.