Uh oh!
There was an error while loading. Please reload this page.
Remove -Zsaturating-float-casts flag - #161971
Conversation
rustbot
commented
Aug 29, 2026
cc @rust-lang/miri
cc @bjorn3 |
rustbot
commented
Aug 29, 2026
r? @chenyukang rustbot has assigned @chenyukang. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
00a15d4 to
450162eCompareI added this flag back in 2017 to enable benchmarking of the saturating semantics when it was newly implemented and still experimental. But saturation has been the official semantics for float<->int `as` casts for years now. A flag for turning it off no longer serves any purpose, it's just `-Zplease-miscompile-casts` now.
450162e to
c7d949dCompareMoved the miri part to rust-lang/miri#5297 The changes to codegen backends can only be separated out by first removing the uses of the flag there, waiting for the next sync, and then removing the rustc flag. That seems unnecessary but will do if the codegen backend maintainers would prefer. |
chenyukang
commented
Aug 29, 2026
@rustbot reroll |
RalfJung
commented
Aug 29, 2026
FWIW it'd have been fine to do the Miri part here. For tiny changes that logically belong to a rustc PR we're not strict. But a separate PR also works. :) |
RalfJung
commented
Aug 29, 2026
Cc @rust-lang/compiler in case someone is attached to this flag. r=me if nobody speaks up within the next few days. Thanks for the cleanup! |
RalfJung
commented
Sep 1, 2026
@bors r+ |
…RalfJung Remove -Zsaturating-float-casts flag I added this flag back in 2017 (rust-lang#45205) to enable benchmarking of the saturating semantics when it was newly implemented and still experimental. But saturation has been the official semantics for float<->int `as` casts for years now. A flag for turning it off no longer serves any purpose, it's just `-Zplease-miscompile-casts` now.
…RalfJung Remove -Zsaturating-float-casts flag I added this flag back in 2017 (rust-lang#45205) to enable benchmarking of the saturating semantics when it was newly implemented and still experimental. But saturation has been the official semantics for float<->int `as` casts for years now. A flag for turning it off no longer serves any purpose, it's just `-Zplease-miscompile-casts` now.
…uwer Rollup of 11 pull requests Successful merges: - #151618 (rustdoc: add `--print` option) - #161287 (Update `icu_list` dependency to 2.3) - #161767 (change DEFAULT_STACK_SIZE to be 32MB on s390x) - #161968 (Diverse offload fixes) - #161971 (Remove -Zsaturating-float-casts flag) - #162071 (Fix ICE of getting item name from RPITIT) - #161209 (Rework `next_power_of_two` to always be `1 << …`) - #162073 (Change some `Infallible` to `!` in std) - #162086 (Remove `gate_check` from `AttributeStability::Unstable`) - #162102 (`alloc` crate: shrink undocumented `unsafe` blocks) - #162110 (make it clear that Range cannot represent arbitrary ranges)
Uh oh!
There was an error while loading. Please reload this page.
Rollup merge of #161971 - hanna-kruppe:rm-flag-satfpcast, r=RalfJung Remove -Zsaturating-float-casts flag I added this flag back in 2017 (#45205) to enable benchmarking of the saturating semantics when it was newly implemented and still experimental. But saturation has been the official semantics for float<->int `as` casts for years now. A flag for turning it off no longer serves any purpose, it's just `-Zplease-miscompile-casts` now.
I added this flag back in 2017 (#45205) to enable benchmarking of the saturating semantics when it was newly implemented and still experimental. But saturation has been the official semantics for float<->int
ascasts for years now. A flag for turning it off no longer serves any purpose, it's just-Zplease-miscompile-castsnow.