Module expr

Source

Structs§

ControlFlow 🔒

Enums§

ExprType 🔒
RhsAssignKind 🔒
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 🔒
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 true 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_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 else keyword with surrounding comments.
rewrite_empty_block 🔒
rewrite_expr_addrof 🔒
rewrite_field 🔒
rewrite_index 🔒
rewrite_int_lit 🔒
rewrite_label 🔒
rewrite_let 🔒
rewrite_let_else_block 🔒
Rewrite the divergent block of a let-else statement.
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 true 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 🔒
struct_lit_can_be_aligned 🔒
struct_lit_field_separator 🔒
to_control_flow 🔒
wrap_struct_field 🔒