You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My version of rustfmt (rustfmt 1.4.14-stable (e417356 2020-04-21)) rewrites the following to something with different semantic meaning. The code is invalid so rustfmt should probably reject it (notice the double if if if).
#[inline]pubfn r_q_p01_boundaries(p:f64,left:f64,right:f64,lower_tail:bool,log_p:bool) -> Option<f64>{if log_p {if p > 0.0{Some(f64::NAN)}elseif p == 0.0{/* upper bound*/Some(if lower_tail {
right
}else{
left
})}elseifif p == f64::NEG_INFINITY{Some(if lower_tail {
left
}else{
right
})}else{None}}else{/* !log_p */if p < 0.0 || p > 1.0{Some(f64::NAN)}elseif p == 0.0{Some(if lower_tail {
left
}else{
right
})}elseif p == 1.0{Some(if lower_tail {
right
}else{
left
})}else{None}}}
The text was updated successfully, but these errors were encountered:
Thanks @derekdreery. This has already been fixed in source and is a duplicate of a few other issues (#4126 and #4249), so I am going to go ahead and close.
My version of rustfmt (rustfmt 1.4.14-stable (e417356 2020-04-21)) rewrites the following to something with different semantic meaning. The code is invalid so rustfmt should probably reject it (notice the double if
if if
).The text was updated successfully, but these errors were encountered: