Skip to content

test_nan: ensure the NAN contant is quiet #140149

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Apr 23, 2025
Merged

Conversation

RalfJung
Copy link
Member

Follow-up to #139483

r? @tgross35

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 22, 2025
@tgross35
Copy link
Contributor

Thanks for updating the docs too, those constants are somewhat underdocumented. It would be nice if we eventually did something like #88734.

Cc @martn3, this may need some followup for mips since I think the NaN bit may be reversed in some circumstances.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 22, 2025

📌 Commit 5717623 has been approved by tgross35

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 22, 2025
@RalfJung
Copy link
Member Author

Cc @martn3, this may need some followup for mips since I think the NaN bit may be reversed in some circumstances.

The NAN is generated by const-eval which always assumes that the quiet/signaling bit being 1 means "quiet". So the test should pass on MIPS as well.

Rust doesn't really support targets where the quiet/signaling bit is reversed, and will show some odd behavior on those targets. The same goes for LLVM, so chances are good we're even unsound on those targets.

ChrisDenton added a commit to ChrisDenton/rust that referenced this pull request Apr 22, 2025
test_nan: ensure the NAN contant is quiet

Follow-up to rust-lang#139483

r? `@tgross35`
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 22, 2025
…enton

Rollup of 8 pull requests

Successful merges:

 - rust-lang#139309 (make abi_unsupported_vector_types a hard error)
 - rust-lang#139617 (Use posix_spawn on cygwin)
 - rust-lang#140072 (handle function alignment in miri)
 - rust-lang#140104 (Fix auto diff failing on inherent impl blocks)
 - rust-lang#140124 (Update books)
 - rust-lang#140144 (Handle another negated literal in `eat_token_lit`.)
 - rust-lang#140146 (Update `compiler_builtins` to 0.1.156)
 - rust-lang#140149 (test_nan: ensure the NAN contant is quiet)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 22, 2025
…enton

Rollup of 8 pull requests

Successful merges:

 - rust-lang#139617 (Use posix_spawn on cygwin)
 - rust-lang#139921 (improve diagnostic for raw pointer field access with ->)
 - rust-lang#140031 (compiletest: Fix deadline bugs in new executor)
 - rust-lang#140072 (handle function alignment in miri)
 - rust-lang#140104 (Fix auto diff failing on inherent impl blocks)
 - rust-lang#140124 (Update books)
 - rust-lang#140144 (Handle another negated literal in `eat_token_lit`.)
 - rust-lang#140149 (test_nan: ensure the NAN contant is quiet)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 22, 2025
…enton

Rollup of 8 pull requests

Successful merges:

 - rust-lang#139617 (Use posix_spawn on cygwin)
 - rust-lang#139921 (improve diagnostic for raw pointer field access with ->)
 - rust-lang#140031 (compiletest: Fix deadline bugs in new executor)
 - rust-lang#140072 (handle function alignment in miri)
 - rust-lang#140104 (Fix auto diff failing on inherent impl blocks)
 - rust-lang#140124 (Update books)
 - rust-lang#140144 (Handle another negated literal in `eat_token_lit`.)
 - rust-lang#140149 (test_nan: ensure the NAN contant is quiet)

r? `@ghost`
`@rustbot` modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2025
Rollup merge of rust-lang#140149 - RalfJung:test_nan, r=tgross35

test_nan: ensure the NAN contant is quiet

Follow-up to rust-lang#139483

r? ``@tgross35``
@bors bors merged commit 2d8264f into rust-lang:master Apr 23, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 23, 2025
@RalfJung RalfJung deleted the test_nan branch April 23, 2025 12:56
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 24, 2025
test_nan: ensure the NAN contant is quiet

Follow-up to rust-lang#139483

r? ``@tgross35``
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants