Files
rust/tests/ui/derives/eq-ord/derive-eq-check-all-variants.rs
T
2026-04-22 20:22:40 +00:00

13 lines
300 B
Rust

//! Regression test for https://github.com/rust-lang/rust/issues/103157.
#[derive(PartialEq, Eq)]
pub enum Value {
Boolean(Option<bool>),
Float(Option<f64>), //~ ERROR the trait bound `f64: Eq` is not satisfied
}
fn main() {
let a = Value::Float(Some(f64::NAN));
assert!(a == a);
}