Repository navigation
Fix float zero patterns after a failed guard - #166500
Merged
rust-bors[bot] merged 1 commit intoNov 25, 2026
Merged
Conversation
itsfuad
marked this pull request as ready for review
November 24, 2026 16:34
Collaborator
|
Some changes occurred in match lowering cc @Nadrieril |
Collaborator
|
r? @chenyukang rustbot has assigned @chenyukang. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
|
Hi, thanks for the fix! Looks good to me r? me |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 24, 2026
…ern, r=Nadrieril Fix float zero patterns after a failed guard Fixes rust-lang#165311 After rust-lang#122459, match lowering compares float constants by bits, so `-0.0` is not equal to `0.0`. This PR compares them as floats, like range patterns already do.
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 24, 2026
…ern, r=Nadrieril Fix float zero patterns after a failed guard Fixes rust-lang#165311 After rust-lang#122459, match lowering compares float constants by bits, so `-0.0` is not equal to `0.0`. This PR compares them as floats, like range patterns already do.
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 24, 2026
…uwer Rollup of 14 pull requests Successful merges: - #165847 (Skip fulfillment when normalization produces no obligations) - #166147 (Lower to `hir::Param`s for required trait functions) - #166414 (rustdoc: Use source snippet to render `include_*` literals) - #166497 (Integrate doc comment target checking on parameters & where bounds) - #166500 (Fix float zero patterns after a failed guard) - #165791 (Sync tier 3 addition policy with Forge) - #166400 (Revert "stabilize {Arc,Rc}::is_unique") - #166417 (Correctly specify that the head cannot be >= capacity) - #166448 (triagebot: Send "in progress" message when nomination is in progress) - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout) - #166498 (Update the Platform Support page for the *-espidf targets) - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results) - #166511 (Documentation: clarify Termination::report doc) - #166514 (coroutine: unify the word choice)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 24, 2026
…uwer Rollup of 14 pull requests Successful merges: - #165847 (Skip fulfillment when normalization produces no obligations) - #166147 (Lower to `hir::Param`s for required trait functions) - #166414 (rustdoc: Use source snippet to render `include_*` literals) - #166497 (Integrate doc comment target checking on parameters & where bounds) - #166500 (Fix float zero patterns after a failed guard) - #165791 (Sync tier 3 addition policy with Forge) - #166400 (Revert "stabilize {Arc,Rc}::is_unique") - #166417 (Correctly specify that the head cannot be >= capacity) - #166448 (triagebot: Send "in progress" message when nomination is in progress) - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout) - #166498 (Update the Platform Support page for the *-espidf targets) - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results) - #166511 (Documentation: clarify Termination::report doc) - #166514 (coroutine: unify the word choice)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 24, 2026
…ern, r=Nadrieril Fix float zero patterns after a failed guard Fixes rust-lang#165311 After rust-lang#122459, match lowering compares float constants by bits, so `-0.0` is not equal to `0.0`. This PR compares them as floats, like range patterns already do.
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 24, 2026
…uwer Rollup of 15 pull requests Successful merges: - #166429 (1.100.1 relnotes) - #165847 (Skip fulfillment when normalization produces no obligations) - #166147 (Lower to `hir::Param`s for required trait functions) - #166414 (rustdoc: Use source snippet to render `include_*` literals) - #166497 (Integrate doc comment target checking on parameters & where bounds) - #166500 (Fix float zero patterns after a failed guard) - #165791 (Sync tier 3 addition policy with Forge) - #166400 (Revert "stabilize {Arc,Rc}::is_unique") - #166417 (Correctly specify that the head cannot be >= capacity) - #166448 (triagebot: Send "in progress" message when nomination is in progress) - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout) - #166498 (Update the Platform Support page for the *-espidf targets) - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results) - #166511 (Documentation: clarify Termination::report doc) - #166514 (coroutine: unify the word choice)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 24, 2026
…uwer Rollup of 15 pull requests Successful merges: - #166429 (1.100.1 relnotes) - #165847 (Skip fulfillment when normalization produces no obligations) - #166147 (Lower to `hir::Param`s for required trait functions) - #166414 (rustdoc: Use source snippet to render `include_*` literals) - #166497 (Integrate doc comment target checking on parameters & where bounds) - #166500 (Fix float zero patterns after a failed guard) - #165791 (Sync tier 3 addition policy with Forge) - #166400 (Revert "stabilize {Arc,Rc}::is_unique") - #166417 (Correctly specify that the head cannot be >= capacity) - #166448 (triagebot: Send "in progress" message when nomination is in progress) - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout) - #166498 (Update the Platform Support page for the *-espidf targets) - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results) - #166511 (Documentation: clarify Termination::report doc) - #166514 (coroutine: unify the word choice)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 24, 2026
Rollup of 15 pull requests Successful merges: - #165847 (Skip fulfillment when normalization produces no obligations) - #166147 (Lower to `hir::Param`s for required trait functions) - #166414 (rustdoc: Use source snippet to render `include_*` literals) - #166497 (Integrate doc comment target checking on parameters & where bounds) - #166500 (Fix float zero patterns after a failed guard) - #165791 (Sync tier 3 addition policy with Forge) - #166417 (Correctly specify that the head cannot be >= capacity) - #166429 (1.100.1 relnotes) - #166448 (triagebot: Send "in progress" message when nomination is in progress) - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout) - #166498 (Update the Platform Support page for the *-espidf targets) - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results) - #166511 (Documentation: clarify Termination::report doc) - #166514 (coroutine: unify the word choice) - #166521 (Not-so-pointless change to hashbrown subtree)
clarfonthey
pushed a commit
to clarfonthey/hashbrown
that referenced
this pull request
Nov 25, 2026
Rollup of 15 pull requests Successful merges: - rust-lang/rust#165847 (Skip fulfillment when normalization produces no obligations) - rust-lang/rust#166147 (Lower to `hir::Param`s for required trait functions) - rust-lang/rust#166414 (rustdoc: Use source snippet to render `include_*` literals) - rust-lang/rust#166497 (Integrate doc comment target checking on parameters & where bounds) - rust-lang/rust#166500 (Fix float zero patterns after a failed guard) - rust-lang/rust#165791 (Sync tier 3 addition policy with Forge) - rust-lang/rust#166417 (Correctly specify that the head cannot be >= capacity) - rust-lang/rust#166429 (1.100.1 relnotes) - rust-lang/rust#166448 (triagebot: Send "in progress" message when nomination is in progress) - rust-lang/rust#166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout) - rust-lang/rust#166498 (Update the Platform Support page for the *-espidf targets) - rust-lang/rust#166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results) - rust-lang/rust#166511 (Documentation: clarify Termination::report doc) - rust-lang/rust#166514 (coroutine: unify the word choice) - rust-lang/rust#166521 (Not-so-pointless change to hashbrown subtree)
flip1995
pushed a commit
to flip1995/rust-clippy
that referenced
this pull request
Nov 26, 2026
Rollup of 15 pull requests Successful merges: - rust-lang/rust#165847 (Skip fulfillment when normalization produces no obligations) - rust-lang/rust#166147 (Lower to `hir::Param`s for required trait functions) - rust-lang/rust#166414 (rustdoc: Use source snippet to render `include_*` literals) - rust-lang/rust#166497 (Integrate doc comment target checking on parameters & where bounds) - rust-lang/rust#166500 (Fix float zero patterns after a failed guard) - rust-lang/rust#165791 (Sync tier 3 addition policy with Forge) - rust-lang/rust#166417 (Correctly specify that the head cannot be >= capacity) - rust-lang/rust#166429 (1.100.1 relnotes) - rust-lang/rust#166448 (triagebot: Send "in progress" message when nomination is in progress) - rust-lang/rust#166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout) - rust-lang/rust#166498 (Update the Platform Support page for the *-espidf targets) - rust-lang/rust#166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results) - rust-lang/rust#166511 (Documentation: clarify Termination::report doc) - rust-lang/rust#166514 (coroutine: unify the word choice) - rust-lang/rust#166521 (Not-so-pointless change to hashbrown subtree)
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.
Fixes #165311
After #122459, match lowering compares float constants by bits, so
-0.0is not equal to0.0.This PR compares them as floats, like range patterns already do.