rust-lang / rust-bindgen

Automatically generates Rust FFI bindings to C (and some C++) libraries.
https://rust-lang.github.io/rust-bindgen/
BSD 3-Clause "New" or "Revised" License
4.23k stars 679 forks source link

Fix generated constants: f64::INFINITY & f64::NEG_ INFINITY #2854

Closed gabiganam closed 2 days ago

gabiganam commented 1 week ago

https://github.com/rust-lang/rust-bindgen/issues/2853

pvdrz commented 1 week ago

I'm not sure of Bindgen's MSRV policy for generated crates, but these constants require at least Rust 1.43.

If that's the case, there should be a new variant in RustTarget representing 1.43 and this change should be gated behind a feature that enables if the target version is larger or equal than 1.43

gabiganam commented 1 week ago

I'm not sure of Bindgen's MSRV policy for generated crates, but these constants require at least Rust 1.43.

If that's the case, there should be a new variant in RustTarget representing 1.43 and this change should be gated behind a feature that enables if the target version is larger or equal than 1.43

Updated the PR, hope this is what you meant.

madsmtm commented 1 week ago

@gabiganam requested a review from @madsmtm

Sorry, I'm the wrong person to ask for this, I'm not a maintainer here.