File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -122,11 +122,35 @@ macro_rules! from_str_float_impl {
122122 /// * '2.5E10', or equivalently, '2.5e10'
123123 /// * '2.5E-10'
124124 /// * '5.'
125- /// * '.5', or, equivalently, '0.5'
125+ /// * '.5', or, equivalently, '0.5'
126126 /// * 'inf', '-inf', 'NaN'
127127 ///
128128 /// Leading and trailing whitespace represent an error.
129129 ///
130+ /// # Grammar
131+ ///
132+ /// All strings that adhere to the following regular expression
133+ /// will result in an [`Ok`] being returned:
134+ ///
135+ /// ```txt
136+ /// (\+|-)?
137+ /// (inf|
138+ /// NaN|
139+ /// ([0-9]+|
140+ /// [0-9]+\.[0-9]*|
141+ /// [0-9]*\.[0-9]+)
142+ /// ((e|E)
143+ /// (\+|-)?
144+ /// [0-9]+)?)
145+ /// ```
146+ ///
147+ /// # Known bugs
148+ ///
149+ /// * [#31407]: Some strings that adhere to the regular expression
150+ /// above will incorrectly return an [`Err`].
151+ ///
152+ /// [#31407]: https://github.com/rust-lang/rust/issues/31407
153+ ///
130154 /// # Arguments
131155 ///
132156 /// * src - A string
You can’t perform that action at this time.
0 commit comments