Skip to content

Commit bd6fae1

Browse files
Fix and clarify docs on FloatLit
Closes #14
1 parent 458d6e1 commit bd6fae1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/float/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ use crate::{
88

99

1010

11-
/// A floating point literal, e.g. `3.14`, `8.`, `135e12`, `27f32` or `1.956e2f64`.
11+
/// A floating point literal, e.g. `3.14`, `8.`, `135e12`, or `1.956e2f64`.
1212
///
1313
/// This kind of literal has several forms, but generally consists of a main
1414
/// number part, an optional exponent and an optional type suffix. See
1515
/// [the reference][ref] for more information.
1616
///
1717
/// A leading minus sign `-` is not part of the literal grammar! `-3.14` are two
18-
/// tokens in the Rust grammar.
18+
/// tokens in the Rust grammar. Further, `27` and `27f32` are both not float,
19+
/// but integer literals! Consequently `FloatLit::parse` will reject them.
1920
///
2021
///
2122
/// [ref]: https://doc.rust-lang.org/reference/tokens.html#floating-point-literals

0 commit comments

Comments
 (0)