indent_next_line in rustfmt_nightly::utils - Rust
Description: Based on the given line, determine if the next line can be indented or not. This allows to preserve the indentation of multi-line literals when re-inserted a code block that has been formatted separately from the rest of the code, such as code in macro defs or code blocks doc comments.

Skip to main content

## indent_next_line

# Function indent_next_line

Source

    pub(crate) fn indent_next_line(
        kind: FullCodeCharKind,
        line: &str,
        config: &Config,
    ) -> bool

Expand description

Based on the given line, determine if the next line can be indented or not. This allows to preserve the indentation of multi-line literals when re-inserted a code block that has been formatted separately from the rest of the code, such as code in macro defs or code blocks doc comments.