Skip to content
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

RangeInclusive of floats containing one element panics #479

Open
uzytkownik opened this issue Jul 7, 2024 · 0 comments
Open

RangeInclusive of floats containing one element panics #479

uzytkownik opened this issue Jul 7, 2024 · 0 comments
Labels
bug This is a bug

Comments

@uzytkownik
Copy link

Following code panics:

#[test]
fn test(x in 0.0..=0.0) {

}

Even though 0 is in 0..=0 interval. This does not happen with the integers. Following is a workaround on unstable:

#[test]
fn test(x in 0.0..0.0_f32.next_up()) {

}
@matthew-russo matthew-russo added the bug This is a bug label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants