Module rustfmt_nightly::expr
source · Structs§
- Control
Flow π
Enums§
- Expr
Type π - RhsAssign
Kind π - RhsTactics πControls where to put the rhs.
Functions§
- block_
has_ πstatements - block_
prefix π - choose_
matcher π - choose_
rhs π - extract_
comment π - 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 Returnstrue
if the last line of pat_str has leading whitespace and it is wider than the shapeβs indent. - lit_
ends_ πin_ dot - 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_
assignment π - rewrite_
block π - rewrite_
block_ πinner - rewrite_
call π - rewrite_
cond π - Rewrite the
else
keyword with surrounding comments. - rewrite_
empty_ πblock - rewrite_
expr_ πaddrof - rewrite_
field π - rewrite_
index π - rewrite_
int_ πlit - rewrite_
label π - rewrite_
let π - Rewrite the divergent block of a
let-else
statement. - rewrite_
literal π - rewrite_
paren π - rewrite_
string_ πlit - rewrite_
struct_ πlit - rewrite_
tuple π - rewrite_
unary_ πop - rewrite_
unary_ πprefix - rewrite_
unary_ πsuffix - span_
ends_ πwith_ comma Returnstrue
if 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 - to_
control_ πflow - wrap_
struct_ πfield