diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2025-08-19 19:42:09 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-19 19:42:09 +0800 |
| commit | 0b378a7108e550b6edb7ee0669a64f24dac364f1 (patch) | |
| tree | 0a106b395f83a77d1e3e0de17108d40b979e7df8 | |
| parent | 8568070822c4a081bd05d53f03eadb2230bef752 (diff) | |
| parent | 2f796d9021990cea2cd6de71155e05263e9ce3a2 (diff) | |
| download | rust-0b378a7108e550b6edb7ee0669a64f24dac364f1.tar.gz rust-0b378a7108e550b6edb7ee0669a64f24dac364f1.zip | |
Rollup merge of #145255 - lune-climate:dec2flt-doc, r=ibraheemdev
dec2flt: Provide more valid inputs examples I was just looking at the specifics of how the parsing is handled here and I wasn't sure if the examples were incomplete or the grammar below was misleading. The grammar was correct so I figured I'd add these examples to clarify.
| -rw-r--r-- | library/core/src/num/dec2flt/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/num/dec2flt/mod.rs b/library/core/src/num/dec2flt/mod.rs index 1844cd98082..3118a6e5ca6 100644 --- a/library/core/src/num/dec2flt/mod.rs +++ b/library/core/src/num/dec2flt/mod.rs @@ -124,6 +124,8 @@ macro_rules! from_str_float_impl { /// * '2.5E-10' /// * '5.' /// * '.5', or, equivalently, '0.5' + /// * '7' + /// * '007' /// * 'inf', '-inf', '+infinity', 'NaN' /// /// Note that alphabetical characters are not case-sensitive. |
