summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Chen <79286236+ijchen@users.noreply.github.com>2022-05-28 18:24:34 -0400
committerGitHub <noreply@github.com>2022-05-28 18:24:34 -0400
commit0484cfb6a91d1236809cfe4c536aa29b498e518d (patch)
tree2b1336e8a23c1445d7bab56d942f1081f0f7efd9
parent1fede1753c33f4ce0660ad9b8edbd618d9733daf (diff)
downloadrust-0484cfb6a91d1236809cfe4c536aa29b498e518d.tar.gz
Corrected EBNF grammar for from_str
Previously, the `Number` part of the EBNF grammar had an option for `'.' Digit*`, which would include the string "." (a single decimal point). This is not valid, and does not return an Ok as stated. The corrected version removes this, and still allows for the `'.' Digit+` case with the already existing `Digit* '.' Digit+` case.
-rw-r--r--library/core/src/num/dec2flt/mod.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/library/core/src/num/dec2flt/mod.rs b/library/core/src/num/dec2flt/mod.rs
index df0e7431f1f..a888ced49b3 100644
--- a/library/core/src/num/dec2flt/mod.rs
+++ b/library/core/src/num/dec2flt/mod.rs
@@ -126,7 +126,6 @@ macro_rules! from_str_float_impl {
/// ```txt
/// Float ::= Sign? ( 'inf' | 'infinity' | 'nan' | Number )
/// Number ::= ( Digit+ |
- /// '.' Digit* |
/// Digit+ '.' Digit* |
/// Digit* '.' Digit+ ) Exp?
/// Exp ::= 'e' Sign? Digit+