mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
13 lines
242 B
Rust
13 lines
242 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);
|
||
|
}
|