// we want `Fw32 == FwAny` and `FwAny == Fw64`, by transitivity we must have
// `Fw32 == Fw64` so don’t compare them
match (ls.parse::<f64>(), rs.parse::<f64>()) {
- (Ok(l), Ok(r)) => l.eq(&r),
+ (Ok(l), Ok(r)) => l.eq(&r) &&
+ (l.is_sign_positive() == r.is_sign_positive()), // needed for 0.0 != -0.0
_ => false,
}
}
_ => 0,
};
+ let _ = if true {
+ //~^NOTE same as this
+ 0.0
+ } else { //~ERROR this `if` has identical blocks
+ 0.0
+ };
+
+ let _ = if true {
+ //~^NOTE same as this
+ -0.0
+ } else { //~ERROR this `if` has identical blocks
+ -0.0
+ };
+
+ let _ = if true {
+ 0.0
+ } else {
+ -0.0
+ };
+
+ let _ = match Some(()) {
+ Some(()) => 0.0,
+ None => -0.0
+ };
+
match (Some(42), Some("")) {
(Some(a), None) => bar(a),
(None, Some(a)) => bar(a), // bindings have different types