Skip to content

assertion failed: !nan.is_sign_positive() && !nan.is_sign_negative() #312

Closed
@cuviper

Description

@cuviper

The standard library has changed behavior: issue rust-lang/rust#42425, pr rust-lang/rust#42431

This breaks our tests on nightly:

---- src/float.rs - float::Float::is_sign_positive (line 329) stdout ----
	thread 'rustc' panicked at 'test executable failed:

thread 'main' panicked at 'assertion failed: !nan.is_sign_positive() && !nan.is_sign_negative()', <anon>:14
note: Run with `RUST_BACKTRACE=1` for a backtrace.

', /checkout/src/librustdoc/test.rs:318
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- src/float.rs - float::Float::is_sign_negative (line 348) stdout ----
	thread 'rustc' panicked at 'test executable failed:

thread 'main' panicked at 'assertion failed: !nan.is_sign_positive() && !nan.is_sign_negative()', <anon>:14
note: Run with `RUST_BACKTRACE=1` for a backtrace.

', /checkout/src/librustdoc/test.rs:318


failures:
    src/float.rs - float::Float::is_sign_negative (line 348)
    src/float.rs - float::Float::is_sign_positive (line 329)

I think we'll have to drop our own expectations about NaN here, and just let it follow whatever std does, whether old or new. We also have our own implementations for no_std on the next branch, which should probably follow the new behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions