Rollup merge of #126271 - diondokter:dec2flt-skip-fast-path, r=tgross35 · model-checking/verify-rust-std@00d603f (original) (raw)
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -250,8 +250,10 @@ pub fn dec2flt<F: RawFloat>(s: &str) -> Result<F, ParseFloatError> { | ||
250 | 250 | None => return Err(pfe_invalid()), |
251 | 251 | }; |
252 | 252 | num.negative = negative; |
253 | -if let Some(value) = num.try_fast_path::<F>() { | |
254 | -return Ok(value); | |
253 | +if !cfg!(feature = "optimize_for_size") { | |
254 | +if let Some(value) = num.try_fast_path::<F>() { | |
255 | +return Ok(value); | |
256 | +} | |
255 | 257 | } |
256 | 258 | |
257 | 259 | // If significant digits were truncated, then we can have rounding error |