blob: 52b4c7898d87bae0e2262ff36f3e330c5d23cdf1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// 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);
}
|