Skip to content

Conversation

@PoignardAzur
Copy link
Contributor

No description provided.

@PoignardAzur
Copy link
Contributor Author

   error[E0599]: no method named `abs` found for type `f32` in the current scope
   --> parley/src/util.rs:7:13
    |
  7 |     (x - y).abs() < f32::EPSILON
    |             ^^^ method not found in `f32`
    |

Wait, I'm confused.

cargo check -p parley --no-default-features --features libm works on my machine. Does the presence of abs in no_std mode depend on the target?

@nicoburns
Copy link
Collaborator

That is indeed weird. The docs show that this has been stable since 1.0, but I think that's a lie for nostd. I believe this was moved from std to core relatively recently. But this compiles locally for me with your command and Rust 1.82.

@PoignardAzur
Copy link
Contributor Author

But this compiles locally for me with your command and Rust 1.82.

So this should compile for CI too, right?

@tomcur
Copy link
Member

tomcur commented Oct 30, 2025

Changelog claims these were moved into core in 1.84: https://releases.rs/docs/1.84.0/.

@PoignardAzur
Copy link
Contributor Author

I've tried Rust 1.82 (indeed fails) and Rust 1.84 (indeed works).

Do you think it's worth bumping MSRV two versions for this? I guess it wouldn't solve the "warning fires on latest Rust but not MSRV" problem.

@nicoburns
Copy link
Collaborator

Do you think it's worth bumping MSRV two versions for this?

Probably not for this, given that there are other functions which still need to be polyfilled on latest Rust.

Although #424 proposes to bump MSRV beyond this point anyway. If it wasn't required for SIMD support, then I would campaign for keeping Parley's MSRV <= 1.85, because that's what Debian stable is currently shipping. But given that fearless_simd is already 1.86 and we may want to use it in Parley, then I'm inclined to allow MSRV bumps if people want them.

@PoignardAzur
Copy link
Contributor Author

Alright, I'm changing the status to draft until we either bump the MSRV or find a better way to gate this warning.

@PoignardAzur PoignardAzur marked this pull request as draft October 30, 2025 14:24
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