about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/example/alloc_example.rs
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2025-05-29 14:44:32 +0000
committerTrevor Gross <tmgross@umich.edu>2025-05-29 21:13:26 +0000
commit70cce1c76264cfa7006d296a81ff2ae01afe186a (patch)
tree13cba5860eeb45ff2efe75bf520d7aa331740f86 /compiler/rustc_codegen_gcc/example/alloc_example.rs
parent5446ba3c2d8766e3c6fcfe9e09c6e513c341dfc4 (diff)
downloadrust-70cce1c76264cfa7006d296a81ff2ae01afe186a.tar.gz
rust-70cce1c76264cfa7006d296a81ff2ae01afe186a.zip
float: Use `assert_biteq!` where possible
`assert_eq!` ignores the sign of zero, but for any tests involving zeros
we do care about this sign. Replace `assert_eq!` with `assert_biteq!`
everywhere possible for float tests to ensure we don't miss this.
`assert_biteq!` is also updated to check equality on non-NaNs, to catch
the unlikely case that bitwise equality works but our `==`
implementation is broken.

There is one notable output change: we were asserting that
`(-0.0).fract()` and `(-1.0).fract()` both return -0.0, but both
actually return +0.0.
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/alloc_example.rs')
0 files changed, 0 insertions, 0 deletions