rust/tests/ui/deriving/issue-103157.rs
2023-01-11 09:32:08 +00:00

13 lines
241 B
Rust

// check-fail
#[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);
}