-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
feature external_doc not traversed by rustfmt #60997
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-external_doc`#![feature(external_doc)]``#![feature(external_doc)]`T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-external_doc`#![feature(external_doc)]``#![feature(external_doc)]`T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
When using the nightly external doc feature #44732 ,
rustfmtceases to be able to tidy code blocks in the documentation.As a test, I put a documentation code block that was previously in a
.rsfile into aninclude='d.mdfile, intentionally made it a mess, and observed thatrustfmtno longer made it look readable:```no_run use grease::repository::CategoryFileIterator;let iterator = CategoryFileIterator::for_file( "/usr/portage", "/usr/portage/profiles/categories",);for item_result in iterator.unwrap() { println!("{}", item_result.unwrap().name());} ```And rustfmt did not indicate any attempts to format this file:
I imagine being able to format these external files would be something that should work prior to this feature being stabilized, or at very least, rustfmt should gain options so that it can do this.