Skip to content

Code in block doc comments are not formatted #5931

Open
@magiclen

Description

@magiclen

With format_code_in_doc_comments = true, rustfmt 1.6.0-nightly can format code in line doc comments, but code in block doc comments cannot be formatted.

/// ```rust
/// println!("hello"); // formatted
/// ```

/**
```rust
   println!("hello");          // not formatted
```
*/

fn f() {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions