File tree 1 file changed +25
-1
lines changed
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 {
122
122
/// * '2.5E10', or equivalently, '2.5e10'
123
123
/// * '2.5E-10'
124
124
/// * '5.'
125
- /// * '.5', or, equivalently, '0.5'
125
+ /// * '.5', or, equivalently, '0.5'
126
126
/// * 'inf', '-inf', 'NaN'
127
127
///
128
128
/// Leading and trailing whitespace represent an error.
129
129
///
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
+ ///
130
154
/// # Arguments
131
155
///
132
156
/// * src - A string
You can’t perform that action at this time.
0 commit comments