Skip to main content

Module overflow

Module overflow 

Source
Expand description

Rewrite a list some items with overflow.

Re-exportsยง

use std::cmp::min; ๐Ÿ”’
use itertools::Itertools; ๐Ÿ”’
use rustc_ast::ast; ๐Ÿ”’
use rustc_ast::token::Delimiter; ๐Ÿ”’
use rustc_span::Span; ๐Ÿ”’
use tracing::debug; ๐Ÿ”’
use crate::closures; ๐Ÿ”’
use crate::config::StyleEdition; ๐Ÿ”’
use crate::config::Config; ๐Ÿ”’
use crate::expr::can_be_overflowed_expr; ๐Ÿ”’
use crate::expr::is_every_expr_simple; ๐Ÿ”’
use crate::expr::is_method_call; ๐Ÿ”’
use crate::expr::is_nested_call; ๐Ÿ”’
use crate::expr::is_simple_expr; ๐Ÿ”’
use crate::expr::rewrite_cond; ๐Ÿ”’
use crate::lists::ListFormatting; ๐Ÿ”’
use crate::lists::ListItem; ๐Ÿ”’
use crate::lists::Separator; ๐Ÿ”’
use crate::lists::definitive_tactic; ๐Ÿ”’
use crate::lists::itemize_list; ๐Ÿ”’
use crate::lists::write_list; ๐Ÿ”’
use crate::macros::MacroArg; ๐Ÿ”’
use crate::patterns::TuplePatField; ๐Ÿ”’
use crate::patterns::can_be_overflowed_pat; ๐Ÿ”’
use crate::rewrite::Rewrite; ๐Ÿ”’
use crate::rewrite::RewriteContext; ๐Ÿ”’
use crate::rewrite::RewriteError; ๐Ÿ”’
use crate::rewrite::RewriteErrorExt; ๐Ÿ”’
use crate::rewrite::RewriteResult; ๐Ÿ”’
use crate::shape::Shape; ๐Ÿ”’
use crate::source_map::SpanUtils; ๐Ÿ”’
use crate::spanned::Spanned; ๐Ÿ”’
use crate::types::SegmentParam; ๐Ÿ”’
use crate::types::can_be_overflowed_type; ๐Ÿ”’
use crate::utils::count_newlines; ๐Ÿ”’
use crate::utils::extra_offset; ๐Ÿ”’
use crate::utils::first_line_width; ๐Ÿ”’
use crate::utils::last_line_width; ๐Ÿ”’
use crate::utils::mk_sp; ๐Ÿ”’
use crate::config::lists::*; ๐Ÿ”’

Macrosยง

impl_into_overflowable_item_for_ast_node ๐Ÿ”’
impl_into_overflowable_item_for_rustfmt_types ๐Ÿ”’

Structsยง

Context ๐Ÿ”’

Enumsยง

OverflowableItem ๐Ÿ”’

Constantsยง

SPECIAL_CASE_ATTR ๐Ÿ”’
SPECIAL_CASE_MACROS ๐Ÿ”’
A list of format!-like macros, that take a long format string and a list of arguments to format.
SPECIAL_CASE_MACROS_V2 ๐Ÿ”’
Additional special case macros for version 2; these are separated to avoid breaking changes in version 1.

Traitsยง

IntoOverflowableItem ๐Ÿ”’

Functionsยง

can_be_overflowed ๐Ÿ”’
into_overflowable_list ๐Ÿ”’
last_item_shape ๐Ÿ”’
Returns a shape for the last argument which is going to be overflowed.
maybe_get_args_offset ๐Ÿ”’
In case special-case style is required, returns an offset from which we start horizontal layout.
need_block_indent ๐Ÿ”’
no_long_items ๐Ÿ”’
rewrite_with_angle_brackets ๐Ÿ”’
rewrite_with_parens ๐Ÿ”’
rewrite_with_square_brackets ๐Ÿ”’
shape_from_indent_style ๐Ÿ”’