]> git.lizzy.rs Git - rust.git/blob - tests/ui/deriving/issue-103157.rs
Merge commit '1d8491b120223272b13451fc81265aa64f7f4d5b' into sync-from-rustfmt
[rust.git] / tests / ui / deriving / issue-103157.rs
1 // check-fail
2
3 #[derive(PartialEq, Eq)]
4 pub enum Value {
5     Boolean(Option<bool>),
6     Float(Option<f64>), //~ ERROR the trait bound `f64: Eq` is not satisfied
7 }
8
9 fn main() {
10     let a = Value::Float(Some(f64::NAN));
11     assert!(a == a);
12 }