Re-exportsΒ§
use std::borrow::Cow;πuse std::cmp::Ordering;πuse std::cmp::max;πuse std::cmp::min;πuse regex::Regex;πuse rustc_ast::ast;πuse rustc_ast::visit;πuse rustc_span::BytePos;πuse rustc_span::DUMMY_SP;πuse rustc_span::Ident;πuse rustc_span::Span;πuse rustc_span::symbol;πuse tracing::debug;πuse crate::attr::filter_inline_attrs;πuse crate::comment::FindUncommented;πuse crate::comment::combine_strs_with_missing_comments;πuse crate::comment::contains_comment;πuse crate::comment::is_last_comment_block;πuse crate::comment::recover_comment_removed;πuse crate::comment::recover_missing_comment_in_span;πuse crate::comment::rewrite_missing_comment;πuse crate::config::BraceStyle;πuse crate::config::Config;πuse crate::config::IndentStyle;πuse crate::config::StyleEdition;πuse crate::expr::RhsAssignKind;πuse crate::expr::RhsTactics;πuse crate::expr::is_empty_block;πuse crate::expr::is_simple_block_stmt;πuse crate::expr::rewrite_assign_rhs;πuse crate::expr::rewrite_assign_rhs_with;πuse crate::expr::rewrite_assign_rhs_with_comments;πuse crate::expr::rewrite_else_kw_with_comments;πuse crate::expr::rewrite_let_else_block;πuse crate::lists::ListFormatting;πuse crate::lists::Separator;πuse crate::lists::definitive_tactic;πuse crate::lists::itemize_list;πuse crate::lists::write_list;πuse crate::macros::MacroPosition;πuse crate::macros::rewrite_macro;πuse crate::overflow;πuse crate::rewrite::ExceedsMaxWidthError;π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::Stmt;πuse crate::types::opaque_ty;πuse crate::vertical::rewrite_with_alignment;πuse crate::visitor::FmtVisitor;πuse crate::config::lists::*;πuse crate::utils::*;π
StructsΒ§
- FnSig π
- Represents a fnβs signature.
- Item π
- Opaque
Type π - Static
Parts π - Struct
Parts π - Trait
Alias πBounds - TyAlias
Rewrite πInfo - Where
Clause πOption
EnumsΒ§
- Body
Element π - Brace
Pos π - FnBrace
Style π - Item
Visitor πKind - Where
Clause πSpace - Kind of spaces to put before
where.
ConstantsΒ§
- DEFAULT_
VISIBILITY π
FunctionsΒ§
- allow_
single_ πline_ let_ else_ block - compute_
budgets_ πfor_ params - enum_
variant_ πspan - format_
empty_ πstruct_ or_ tuple - format_
generics π - format_
header π - format_
impl π - format_
impl_ πref_ and_ type - format_
struct π - format_
struct_ πstruct - format_
trait π - format_
trait_ πalias - format_
tuple_ πstruct - format_
unit_ πstruct - generics_
shape_ πfrom_ config - get_
bytepos_ πafter_ visibility - get_
missing_ πparam_ comments - Recover any missing comments between the param and the type.
- is_
empty_ πinfer - is_
extern_ πcrate - is_
impl_ πsingle_ line - is_
mod_ πdecl - Returns
trueformod foo;, false formod foo { .. }. - is_
named_ πparam - is_
use_ πitem - missing_
span_ πbefore_ after_ where - newline_
for_ πbrace - rewrite_
attrs π - Rewrite the attributes of an item.
- rewrite_
bounds_ πon_ where_ clause - Rewrite bounds on a where clause.
- rewrite_
comments_ πbefore_ after_ where - rewrite_
explicit_ πself - rewrite_
extern_ πcrate - Rewrite
extern crate foo;. The given shape is used to format the extern crateβs attributes. - rewrite_
fn_ πbase - rewrite_
generics π - rewrite_
mod π - Rewrite an inline mod. The given shape is used to format the modβs attributes.
- rewrite_
opt_ πlifetime - rewrite_
params π - rewrite_
static π - rewrite_
struct_ πfield - rewrite_
struct_ πfield_ prefix - rewrite_
trait_ πref - rewrite_
ty π - rewrite_
type_ πalias - rewrite_
where_ πclause - rewrite_
where_ πclause_ rfc_ style - rewrite_
where_ πkeyword - Rewrite
whereand comment around it. - same_
line_ πelse_ kw_ and_ brace - When the initializer expression is multi-lined, then the else keyword and opening brace of the block ( i.e. βelse {β) should be put on the same line as the end of the initializer expression if all the following are true:
- span_
hi_ πfor_ param - span_
lo_ πfor_ param - type_
annotation_ πseparator - type_
annotation_ πspacing