Skip to content

format_code_in_doc_comments adds empty line between trailing comment and hidden code #6612

@jdygert-spok

Description

@jdygert-spok
/// ```
/// println!("1"); // comment
/// # println!("2")
/// ```

becomes

/// ```
/// println!("1"); // comment
///
/// # println!("2")
/// ```

rustfmt 1.8.0-nightly (9748d87dc7 2025-07-21)

Parent: #3348

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions