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() {}