You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Float patterns: an arm with -0.0 is skipped when the guard of an earlier 0.0 arm fails (wrong arm since 1.79) #165311
A-floating-pointArea: Floating point numbers and arithmeticA-patternsRelating to patterns and pattern matchingC-bugCategory: This is a bug.I-miscompileIssue: Correct Rust code lowers to incorrect machine codeP-mediumMedium priorityS-found-by-fuzzingStatus: This issue was found using fuzzing. It may not arise in practical cases.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.
#![forbid(unsafe_code)]#[inline(never)]fnf(x:f64,b:bool) -> u8{match x {0.0if b => 1,
-0.0 => 2,// must match whenever x == -0.0, i.e. for x = 0.0 and x = -0.0
_ => 3,}}fnmain(){let r0 = f(0.0,false);let r1 = f(-0.0,false);println!("f(0.0, false) = {r0}, f(-0.0, false) = {r1} (expected 2, 2)");assert_eq!((r0, r1),(2,2),"wrong match arm");}
Expected:2, 2.
Actual:3, 3, and the assertion fails.
Likely regressor (by reading the diff; not bisected): #122459 "match lowering: sort Eq candidates in the failure case too" (merged 2024-03-31, released in 1.79).
Before: the arm was (TestKind::Eq { value: test_val, .. }, TestCase::Constant { value: case_val }) if test_val == case_val => Success. A candidate with a different constant was left unsorted, so it was still tried after a failed guard.
********************************************************************************
Regression in nightly-2024-04-01
********************************************************************************
get_commits_between returning commits, len: 15
commit[0] 2024-03-30: Auto merge of #99322 - GKFX:const-int-parse, r=Mark-Simulacrum
commit[1] 2024-03-30: Auto merge of #123085 - tgross35:f16-f128-step4.0-libs-basic-impls, r=Amanieu
commit[2] 2024-03-30: Auto merge of #3432 - RalfJung:gc-stress, r=RalfJung
commit[3] 2024-03-30: Auto merge of #3434 - RalfJung:stacked-borrows-cache-consistency, r=RalfJung
commit[4] 2024-03-31: Auto merge of #123181 - stepancheg:pointee-metadata-debug, r=the8472,Amanieu
commit[5] 2024-03-31: Auto merge of #122459 - Nadrieril:sort-eq, r=oli-obk
commit[6] 2024-03-31: Auto merge of #123233 - devnexen:thread_get_name_bsd, r=joboet
commit[7] 2024-03-31: Auto merge of #3435 - rust-lang:rustup-2024-03-31, r=saethlin
commit[8] 2024-03-31: Auto merge of #123236 - klensy:tracing-tree-bump, r=Mark-Simulacrum
commit[9] 2024-03-31: Auto merge of #123258 - lnicola:sync-from-ra, r=lnicola
commit[10] 2024-03-31: Auto merge of #123264 - matthiaskrgr:rollup-smyy7j9, r=matthiaskrgr
commit[11] 2024-03-31: Auto merge of #123246 - Kobzol:tarball-reproducible, r=Mark-Simulacrum
commit[12] 2024-03-31: Auto merge of #121851 - michaelwoerister:mcp-533-effective-vis, r=cjgillot
commit[13] 2024-03-31: Auto merge of #123266 - RalfJung:catch-panic, r=workingjubilee
commit[14] 2024-03-31: Auto merge of #123299 - workingjubilee:rollup-2z8amaj, r=workingjubilee
A-floating-pointArea: Floating point numbers and arithmeticA-patternsRelating to patterns and pattern matchingC-bugCategory: This is a bug.I-miscompileIssue: Correct Rust code lowers to incorrect machine codeP-mediumMedium priorityS-found-by-fuzzingStatus: This issue was found using fuzzing. It may not arise in practical cases.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.
Activity
Jules-Bertholet commentedon Nov 2, 2026
@rustbot label A-patterns A-floating-point I-miscompile regression-from-stable-to-stable
@Nadrieril
Jules-Bertholet commentedon Nov 2, 2026
Bisection confirms an April Fool's regression:
Nadrieril commentedon Nov 2, 2026
Welp, I see myself in there, gotta be #122459
rustbot commentedon Nov 2, 2026
Assigning P-medium (discussion on Zulip)
Rollup merge of rust-lang#166500 - itsfuad:fix/165311-float-zero-patt…
Rollup merge of rust-lang#166500 - itsfuad:fix/165311-float-zero-patt…
Rollup merge of rust-lang#166500 - itsfuad:fix/165311-float-zero-patt…
Rollup merge of rust-lang#166500 - itsfuad:fix/165311-float-zero-patt…
Unrolled build for #166500 in rollup 166532