We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The unions section has an example matching on a float literal, which triggers the rust-lang/rust#41620 compatibility lint:
#[repr(u32)] enum Tag { I, F } #[repr(C)] union U { i: i32, f: f32, } #[repr(C)] struct Value { tag: Tag, u: U, } fn is_zero(v: Value) -> bool { unsafe { match v { Value { tag: I, u: U { i: 0 } } => true, Value { tag: F, u: U { f: 0.0 } } => true, _ => false, } } }
The text was updated successfully, but these errors were encountered:
Eschew fp lit pattern
b18ea92
fix rust-lang#563
e08c49f
Successfully merging a pull request may close this issue.
The unions section has an example matching on a float literal, which triggers the rust-lang/rust#41620 compatibility lint:
The text was updated successfully, but these errors were encountered: