Re-exportsยง
use std::borrow::Cow;๐use rustc_ast::YieldKind;๐use rustc_ast::ast;๐use rustc_ast::ast::Attribute;๐use rustc_ast::ast::ImplRestriction;๐use rustc_ast::ast::MetaItem;๐use rustc_ast::ast::MetaItemInner;๐use rustc_ast::ast::MetaItemKind;๐use rustc_ast::ast::MutRestriction;๐use rustc_ast::ast::NodeId;๐use rustc_ast::ast::Path;๐use rustc_ast::ast::RestrictionKind;๐use rustc_ast::ast::Visibility;๐use rustc_ast::ast::VisibilityKind;๐use rustc_ast_pretty::pprust;๐use rustc_feature::is_builtin_attr_name;๐use rustc_span::BytePos;๐use rustc_span::LocalExpnId;๐use rustc_span::Span;๐use rustc_span::Symbol;๐use rustc_span::SyntaxContext;๐use rustc_span::sym;๐use rustc_span::symbol;๐use unicode_width::UnicodeWidthStr;๐use crate::comment::CharClasses;๐use crate::comment::FullCodeCharKind;๐use crate::comment::LineClasses;๐use crate::comment::filter_normal_code;๐use crate::config::Config;๐use crate::config::StyleEdition;๐use crate::rewrite::RewriteContext;๐use crate::shape::Indent;๐use crate::shape::Shape;๐
Macrosยง
- out_
of_ ๐file_ lines_ range - skip_
out_ ๐of_ file_ lines_ range_ err - skip_
out_ ๐of_ file_ lines_ range_ visitor - source ๐
Traitsยง
- Node
IdExt ๐
Functionsยง
- colon_
spaces ๐ - contains_
custom_ ๐attributes - contains_
skip ๐ - count_
lf_ ๐crlf - Returns the number of LF and CRLF respectively.
- count_
newlines ๐ - depr_
skip_ ๐annotation - extra_
offset ๐ - filter_
attributes ๐ - filtered_
str_ ๐fits - first_
line_ ๐contains_ single_ line_ comment - first_
line_ ๐ends_ with - first_
line_ ๐width - The width of the first line in s.
- format_
auto ๐ - format_
constness ๐ - format_
coro ๐ - format_
defaultness ๐ - format_
extern ๐ - format_
impl_ ๐restriction - format_
mut_ ๐restriction - format_
mutability ๐ - format_
pinnedness_ ๐and_ mutability - format_
range_ ๐end - format_
restriction ๐ - format_
safety ๐ - format_
visibility ๐ - get_
prefix_ ๐space_ width_ and_ end - indent_
next_ ๐line - Based on the given line, determine if the next line can be indented or not. This allows to preserve the indentation of multi-line literals when re-inserted a code block that has been formatted separately from the rest of the code, such as code in macro defs or code blocks doc comments.
- inner_
attributes ๐ - is_
attributes_ ๐extendable - is_
block_ ๐expr - is_
empty_ ๐line - is_
same_ ๐visibility - is_
single_ ๐line - is_skip ๐
- is_
skip_ ๐nested - last_
line_ ๐contains_ single_ line_ comment - last_
line_ ๐extendable - last_
line_ ๐used_ width - The total used width of the last line.
- last_
line_ ๐width - The width of the last line in s.
- left_
most_ ๐sub_ expr - mk_sp ๐
- mk_
sp_ ๐lo_ plus_ one - outer_
attributes ๐ - ptr_
vec_ ๐to_ ref_ vec - remove_
trailing_ ๐white_ spaces - Removes trailing spaces from the specified snippet. We do not remove spaces inside strings or comments.
- rewrite_
ident ๐ - semicolon_
for_ ๐expr - semicolon_
for_ ๐stmt - skip_
annotation ๐ - starts_
with_ ๐newline - stmt_
expr ๐ - trim_
left_ ๐preserve_ layout - Indent each line according to the specified
indent. e.g. - trimmed_
last_ ๐line_ width - unicode_
str_ ๐width - wrap_
str ๐