Skip to content

Commit 5a02105

Browse files
committed
Rustdoc-ify LiteralKind note
1 parent ef65890 commit 5a02105

File tree

1 file changed

+7
-5
lines changed
  • compiler/rustc_lexer/src

1 file changed

+7
-5
lines changed

compiler/rustc_lexer/src/lib.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,17 @@ pub enum DocStyle {
166166
Inner,
167167
}
168168

169-
// Note that the suffix is *not* considered when deciding the `LiteralKind` in
170-
// this type. This means that float literals like `1f32` are classified by this
171-
// type as `Int`. (Compare against `rustc_ast::token::LitKind` and
172-
// `rustc_ast::ast::LitKind.)
169+
/// Enum representing the literal types supported by the lexer.
170+
///
171+
/// Note that the suffix is *not* considered when deciding the `LiteralKind` in
172+
/// this type. This means that float literals like `1f32` are classified by this
173+
/// type as `Int`. (Compare against `rustc_ast::token::LitKind` and
174+
/// `rustc_ast::ast::LitKind`).
173175
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
174176
pub enum LiteralKind {
175177
/// "12_u8", "0o100", "0b120i99", "1f32".
176178
Int { base: Base, empty_int: bool },
177-
/// "12.34f32", "1e3", but not "1f32`.
179+
/// "12.34f32", "1e3", but not "1f32".
178180
Float { base: Base, empty_exponent: bool },
179181
/// "'a'", "'\\'", "'''", "';"
180182
Char { terminated: bool },

0 commit comments

Comments
 (0)