Skip to content

Generated INFINITY & NEG_ INFINITY are invalid in Rust 1.79 #2853

New issue

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

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

Already on GitHub? Sign in to your account

Closed
gabiganam opened this issue Jun 25, 2024 · 0 comments
Closed

Generated INFINITY & NEG_ INFINITY are invalid in Rust 1.79 #2853

gabiganam opened this issue Jun 25, 2024 · 0 comments

Comments

@gabiganam
Copy link
Contributor

Input C/C++ Header

#define POSITIVE_INFINITE (1.0/0.0)
#define NEGATIVE_INFINITE (-1.0/0.0)

Actual Results

pub const POSITIVE_INFINITE: f64 = ::std::f64::INFINITY;
pub const NEGATIVE_INFINITE: f64 = ::std::f64::NEG_INFINITY;

Expected Results

pub const POSITIVE_INFINITE: f64 = f64::INFINITY;
pub const NEGATIVE_INFINITE: f64 = f64::NEG_INFINITY;

Due to new lint rule: https://rust-lang.github.io/rust-clippy/master/index.html#/legacy_numeric_constants

Source code seems to be:

::#prefix::f64::INFINITY

gabiganam added a commit to gabiganam/rust-bindgen that referenced this issue Jun 25, 2024
gabiganam pushed a commit to gabiganam/rust-bindgen that referenced this issue Jun 25, 2024
gabiganam pushed a commit to gabiganam/rust-bindgen that referenced this issue Jun 25, 2024
gabiganam pushed a commit to gabiganam/rust-bindgen that referenced this issue Jun 25, 2024
gabiganam pushed a commit to gabiganam/rust-bindgen that referenced this issue Jun 25, 2024
gabiganam pushed a commit to gabiganam/rust-bindgen that referenced this issue Jun 26, 2024
gabiganam pushed a commit to gabiganam/rust-bindgen that referenced this issue Jun 26, 2024
gabiganam pushed a commit to gabiganam/rust-bindgen that referenced this issue Jun 26, 2024
gabiganam pushed a commit to gabiganam/rust-bindgen that referenced this issue Jun 26, 2024
gabiganam pushed a commit to gabiganam/rust-bindgen that referenced this issue Jun 27, 2024
gabiganam pushed a commit to gabiganam/rust-bindgen that referenced this issue Jun 30, 2024
gabiganam pushed a commit to gabiganam/rust-bindgen that referenced this issue Jun 30, 2024
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

No branches or pull requests

1 participant