Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/// /// confuses rustfmt into a crush #5317

Closed
WaffleLapkin opened this issue Apr 20, 2022 · 1 comment
Closed

/// /// confuses rustfmt into a crush #5317

WaffleLapkin opened this issue Apr 20, 2022 · 1 comment

Comments

@WaffleLapkin
Copy link
Member

The following code crushes rustfmt with the format code in documentation comments option:

/// /// ```
/// ```
/// 
/// ```
/// ```
fn f() {}
; rustfmt --config format_code_in_doc_comments=true t.rs
thread 'main' panicked at 'begin <= end (12 <= 11) when slicing `fn main() {}
`', src/tools/rustfmt/src/lib.rs:399:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
; rustfmt --version
rustfmt 1.4.38-stable (7737e0b 2022-04-04)
@ytmimi
Copy link
Contributor

ytmimi commented Apr 20, 2022

Thanks for the report!

I'm going to close this as I believe this is a duplicate of both #5234 and #4793, and the issue is the empty code block.

@ytmimi ytmimi closed this as completed Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants