Skip to content

Conversation

@folkertdev
Copy link
Contributor

r? @sayantn

The lint for overflowing f16 literals was recently enabled. This causes errors when running std with miri, see #miri > Miri test-libstd Failure (2026-01) @ 💬

  22.397776   error: literal out of range for `f16`
  0.000065        --> src/x86/avx512fp16.rs:23998:23
  0.000014         |
  0.000009   23998 |         assert_eq!(r, 65536.0);
  0.000009         |                       ^^^^^^^
  0.000008         |
  0.000008         = note: the literal `65536.0` does not fit into the type `f16` and will be converted to `f16::INFINITY`
  0.000007         = note: `#[deny(overflowing_literals)]` on by default
  0.000008
  0.000010   error: literal out of range for `f16`
  0.000009        --> src/x86/avx512fp16.rs:24005:23
  0.000008         |
  0.000008   24005 |         assert_eq!(r, 16777216.0);
  0.000007         |                       ^^^^^^^^^^
  0.000008         |
  0.000007         = note: the literal `16777216.0` does not fit into the type `f16` and will be converted to `f16::INFINITY`

@usamoi
Copy link
Contributor

usamoi commented Jan 28, 2026

It's included in #1991.

@folkertdev
Copy link
Contributor Author

Ah, great. Looks like that is ready, so that should do.

@folkertdev folkertdev closed this Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants