From 0484cfb6a91d1236809cfe4c536aa29b498e518d Mon Sep 17 00:00:00 2001 From: Isaac Chen <79286236+ijchen@users.noreply.github.com> Date: Sat, 28 May 2022 18:24:34 -0400 Subject: [PATCH] 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. --- library/core/src/num/dec2flt/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/library/core/src/num/dec2flt/mod.rs b/library/core/src/num/dec2flt/mod.rs index df0e7431f1f5f..a888ced49b376 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+