Module comments

Module comments 

Source

Modulesยง

comment ๐Ÿ”’
Modified from rustc_ast::util::comments.
inline_config

Structsยง

Comment
CommentGatherer ๐Ÿ”’
Comments

Enumsยง

CommentStyle
Consolidation

Constantsยง

DISABLE_END
DISABLE_START

Functionsยง

all_whitespace ๐Ÿ”’
Returns None if the first col chars of s contain a non-whitespace char. Otherwise returns Some(k) where k is first char offset after that leading whitespace. Note that k may be outside bounds of s.
first_non_whitespace ๐Ÿ”’
Returns Some(k) where k is the byte offset of the first non-whitespace char. Returns k = 0 if s starts with a non-whitespace char. If s only contains whitespaces, returns None.
format_doc_block_comment ๐Ÿ”’
Formats a doc block comment line so that they have the * decorator.
line_begin_pos ๐Ÿ”’
Returns the BytePos of the beginning of the current line.
line_with_tabs
Normalizes the leading whitespace of a string slice according to a given tab width.
normalize_block_comment_ws ๐Ÿ”’
Returns a slice of s with a whitespace prefix removed based on col. If the first col chars of s are all whitespace, returns a slice starting after that prefix.