Rollup of 2 pull requests#157340
Open
jhpratt wants to merge 5 commits into
Open
Conversation
this removes the panic path when dividing by the frequency. this also makes calls to Instant::now() faster.
…ChrisDenton windows: Elide division-by-zero checks in Instant::now() This PR teaches LLVM that the frequency of the performance counter is non null so it is able to remove division by zero checks. This removes the panic path in `mul_div_u64` and should make calls to `Instant::now()` (very slightly) faster. As seen in the assembly (see godbolt below), telling LLVM that the frequency is non zero suffices to get the optimization, but I don't know if it could be a great idea to also update the signature of `mul_div_u64`? MSDN page for [QueryPerformanceFrequency](https://learn.microsoft.com/en-us/windows/win32/api/profileapi/nf-profileapi-queryperformancefrequency): > On systems that run Windows XP or later, the function will always succeed when given valid parameters and will thus never return zero. Godbolt: https://rust.godbolt.org/z/xr6x8MrPE
…lt, r=JonathanBrouwer Enable `clippy::mem_replace_with_default` Enables `clippy::mem_replace_with_default` and fixes the errors that occur as a result. Closes rust-lang#157245.
Member
Author
|
@bors r+ rollup=never p=5 |
Contributor
This comment has been minimized.
This comment has been minimized.
Contributor
|
💔 Test for 49642bb failed: CI. Failed job:
|
Collaborator
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
Member
Author
|
@bors retry |
This comment has been minimized.
This comment has been minimized.
Contributor
|
💔 Test for 18ccdea failed: CI. Failed job:
|
Member
Author
|
@bors treeclosed=5 failing to get docker images |
Contributor
|
Tree closed for PRs with priority less than 5. |
Member
Author
|
@bors p=4 retry |
Collaborator
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
This was referenced Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
clippy::mem_replace_with_default#157336 (Enableclippy::mem_replace_with_default)r? @ghost
Create a similar rollup