We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Repro against current master (6495024):
$ echo '#[doc = "..."] static S: () = { #[doc = "..."] struct S; };' | CFG_RELEASE_CHANNEL=dev CFG_RELEASE=dev cargo run --bin rustfmt -- --edition=2018 --emit=stdout --config=normalize_doc_attributes=true ///... static S: () = { #[doc = "..."] struct S; }; error[internal]: not formatted because a comment would be lost --> stdin:1 | 1 | #[doc = "..."] static S: () = { #[doc = "..."] struct S; }; | = note: set `error_on_unformatted = false` to suppress the warning against comments or string literals warning: rustfmt has failed to format. See previous 1 errors.
You can see the first #[doc = "..."] is correctly normalized to ///... while the second is not, due to the printed internal error.
#[doc = "..."]
///...
This seems like a consequence of normalize_doc_attributes=true because the following is formatted with no problem.
normalize_doc_attributes=true
$ echo -e '///...\nstatic S: () = { ///...\nstruct S; };' | CFG_RELEASE_CHANNEL=dev CFG_RELEASE=dev cargo run --bin rustfmt -- --edition=2018 --emit=stdout --config=normalize_doc_attributes=true ///... static S: () = { ///... struct S; };
The text was updated successfully, but these errors were encountered:
MultiPeek
Peekable
No branches or pull requests
Repro against current master (6495024):
You can see the first
#[doc = "..."]
is correctly normalized to///...
while the second is not, due to the printed internal error.This seems like a consequence of
normalize_doc_attributes=true
because the following is formatted with no problem.The text was updated successfully, but these errors were encountered: