diff options
Diffstat (limited to 'tests/ui/deriving/issue-103157.rs')
-rw-r--r-- | tests/ui/deriving/issue-103157.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/deriving/issue-103157.rs b/tests/ui/deriving/issue-103157.rs new file mode 100644 index 000000000..52b4c7898 --- /dev/null +++ b/tests/ui/deriving/issue-103157.rs @@ -0,0 +1,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); +} |