From 7450d842ea778e351320540ad2d13bc4b1f4a249 Mon Sep 17 00:00:00 2001 From: Taylor Cramer Date: Wed, 13 Jul 2016 10:02:28 -0700 Subject: [PATCH] Fix different NaNs in if const expressions test --- tests/compile-fail/copies.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/compile-fail/copies.rs b/tests/compile-fail/copies.rs index b2b54251799..3c3e43931ed 100644 --- a/tests/compile-fail/copies.rs +++ b/tests/compile-fail/copies.rs @@ -9,6 +9,7 @@ #![allow(cyclomatic_complexity)] #![allow(blacklisted_name)] #![allow(collapsible_if)] +#![allow(zero_divided_by_zero, eq_op)] fn bar(_: T) {} fn foo() -> bool { unimplemented!() } @@ -251,9 +252,9 @@ fn if_same_then_else() -> Result<&'static str, ()> { // Different NaNs let _ = if true { - 1.0 / 0.0 + 0.0 / 0.0 } else { - (-5f32).sqrt() + std::f32::NAN }; // Same NaNs -- 2.44.0