Fix different NaNs in if const expressions test
This commit is contained in:
parent
61d1a9b030
commit
7450d842ea
@ -9,6 +9,7 @@
|
|||||||
#![allow(cyclomatic_complexity)]
|
#![allow(cyclomatic_complexity)]
|
||||||
#![allow(blacklisted_name)]
|
#![allow(blacklisted_name)]
|
||||||
#![allow(collapsible_if)]
|
#![allow(collapsible_if)]
|
||||||
|
#![allow(zero_divided_by_zero, eq_op)]
|
||||||
|
|
||||||
fn bar<T>(_: T) {}
|
fn bar<T>(_: T) {}
|
||||||
fn foo() -> bool { unimplemented!() }
|
fn foo() -> bool { unimplemented!() }
|
||||||
@ -251,9 +252,9 @@ fn if_same_then_else() -> Result<&'static str, ()> {
|
|||||||
|
|
||||||
// Different NaNs
|
// Different NaNs
|
||||||
let _ = if true {
|
let _ = if true {
|
||||||
1.0 / 0.0
|
0.0 / 0.0
|
||||||
} else {
|
} else {
|
||||||
(-5f32).sqrt()
|
std::f32::NAN
|
||||||
};
|
};
|
||||||
|
|
||||||
// Same NaNs
|
// Same NaNs
|
||||||
|
Loading…
Reference in New Issue
Block a user