Re-exportsΒ§
use std::borrow::Cow;πuse std::cmp::min;πuse itertools::Itertools;πuse rustc_ast::token::Delimiter;πuse rustc_ast::token::Lit;πuse rustc_ast::token::LitKind;πuse rustc_ast::ForLoopKind;πuse rustc_ast::MatchKind;πuse rustc_ast::ast;πuse rustc_ast::token;πuse rustc_span::BytePos;πuse rustc_span::Span;πuse tracing::debug;πuse crate::chains::rewrite_chain;πuse crate::closures;πuse crate::comment::CharClasses;πuse crate::comment::FindUncommented;πuse crate::comment::combine_strs_with_missing_comments;πuse crate::comment::contains_comment;πuse crate::comment::recover_comment_removed;πuse crate::comment::rewrite_comment;πuse crate::comment::rewrite_missing_comment;πuse crate::config::Config;πuse crate::config::ControlBraceStyle;πuse crate::config::HexLiteralCase;πuse crate::config::IndentStyle;πuse crate::config::StyleEdition;πuse crate::config::FloatLiteralTrailingZero;πuse crate::lists::ListFormatting;πuse crate::lists::Separator;πuse crate::lists::definitive_tactic;πuse crate::lists::itemize_list;πuse crate::lists::shape_for_tactic;πuse crate::lists::struct_lit_formatting;πuse crate::lists::struct_lit_shape;πuse crate::lists::struct_lit_tactic;πuse crate::lists::write_list;πuse crate::macros::MacroPosition;πuse crate::macros::rewrite_macro;πuse crate::matches::rewrite_match;πuse crate::overflow;πuse crate::overflow::IntoOverflowableItem;πuse crate::overflow::OverflowableItem;πuse crate::pairs::PairParts;πuse crate::pairs::rewrite_all_pairs;πuse crate::pairs::rewrite_pair;πuse crate::range::rewrite_range;πuse crate::rewrite::Rewrite;πuse crate::rewrite::RewriteContext;πuse crate::rewrite::RewriteError;πuse crate::rewrite::RewriteErrorExt;πuse crate::rewrite::RewriteResult;πuse crate::shape::Indent;πuse crate::shape::Shape;πuse crate::source_map::LineRangeUtils;πuse crate::source_map::SpanUtils;πuse crate::spanned::Spanned;πuse crate::stmt;πuse crate::string::StringFormat;πuse crate::string::rewrite_string;πuse crate::types::PathContext;πuse crate::types::rewrite_path;πuse crate::utils::colon_spaces;πuse crate::utils::contains_skip;πuse crate::utils::count_newlines;πuse crate::utils::filtered_str_fits;πuse crate::utils::first_line_ends_with;πuse crate::utils::inner_attributes;πuse crate::utils::last_line_extendable;πuse crate::utils::last_line_width;πuse crate::utils::mk_sp;πuse crate::utils::outer_attributes;πuse crate::utils::semicolon_for_expr;πuse crate::utils::unicode_str_width;πuse crate::utils::wrap_str;πuse crate::vertical::rewrite_with_alignment;πuse crate::visitor::FmtVisitor;πuse crate::config::lists::*;π
StructsΒ§
- Control
Flow π - Float
Symbol πParts - Indicates the parts of a float literal specified as a string.
EnumsΒ§
- Expr
Type π - RhsAssign
Kind π - RhsTactics π
- Controls where to put the rhs.
FunctionsΒ§
- block_
contains_ πcomment - block_
has_ πstatements - block_
prefix π - can_
be_ πoverflowed_ expr - choose_
matcher π - choose_
rhs π - choose_
separator_ πtactic - extract_
comment π - extract_
pats_ πand_ cond - float_
lit_ πends_ in_ dot - format_
expr π - is_
empty_ πblock - Checks whether a block contains no statements, expressions, comments, or inner attributes.
- is_
every_ πexpr_ simple - is_
method_ πcall - is_
nested_ πcall - is_
simple_ πblock - is_
simple_ πblock_ stmt - Checks whether a block contains at most one statement or expression, and no comments or attributes.
- is_
simple_ πexpr - is_
unsafe_ πblock - last_
line_ πoffsetted - Returns
trueif the last line of pat_str has leading whitespace and it is wider than the shapeβs indent. - lit_
ends_ πin_ dot - parse_
float_ πsymbol - Parses a float literal. The
symbolmust be a valid floating point literal without a type suffix. Otherwise the function may panic or return wrong result. - prefer_
next_ πline - Returns true if formatting next_line_rhs is better on a new line when compared to the originalβs line formatting.
- rewrite_
array π - rewrite_
assign_ πrhs - rewrite_
assign_ πrhs_ expr - rewrite_
assign_ πrhs_ with - rewrite_
assign_ πrhs_ with_ comments - rewrite_
assignment π - rewrite_
block π - rewrite_
block_ πinner - rewrite_
block_ πwith_ visitor - rewrite_
call π - rewrite_
cond π - rewrite_
else_ πkw_ with_ comments - Rewrite the
elsekeyword with surrounding comments. - rewrite_
empty_ πblock - rewrite_
expr_ πaddrof - rewrite_
field π - rewrite_
float_ πlit - rewrite_
index π - rewrite_
int_ πlit - rewrite_
label π - rewrite_
let π - rewrite_
let_ πelse_ block - Rewrite the divergent block of a
let-elsestatement. - rewrite_
literal π - rewrite_
paren π - rewrite_
paren_ πin_ multi_ line - rewrite_
single_ πline_ block - rewrite_
string_ πlit - rewrite_
struct_ πlit - rewrite_
tuple π - rewrite_
tuple_ πin_ visual_ indent_ style - rewrite_
unary_ πop - rewrite_
unary_ πprefix - rewrite_
unary_ πsuffix - shape_
from_ πrhs_ tactic - span_
ends_ πwith_ comma - Returns
trueif a function call or a method call represented by the given span ends with a trailing comma. This function is used when rewriting macro, as adding or removing a trailing comma from macro can potentially break the code. - stmt_
is_ πexpr - struct_
lit_ πcan_ be_ aligned - struct_
lit_ πfield_ separator - to_
control_ πflow - wrap_
struct_ πfield