@@ -87,7 +87,7 @@ The other major thing that happens in `clean/mod.rs` is the collection of doc co
87
87
` #[doc=""] ` attributes into a separate field of the Attributes struct, present on anything that gets
88
88
hand-written documentation. This makes it easier to collect this documentation later in the process.
89
89
90
- The primary output of this process is a clean::Crate with a tree of Items which describe the
90
+ The primary output of this process is a ` clean::Crate ` with a tree of Items which describe the
91
91
publicly-documentable items in the target crate.
92
92
93
93
### Hot potato
@@ -107,21 +107,26 @@ deprecate that][44136]. If you need finer-grain control over these passes, pleas
107
107
108
108
Here is current (as of this writing) list of passes:
109
109
110
- - ` collapse-docs ` is necessary because each line of a doc comment is given as a
110
+ - ` propagate-doc-cfg ` - propagates ` #[doc(cfg(...))] ` to child items.
111
+ - ` collapse-docs ` concatenates all document attributes into one document
112
+ attribute. This is necessary because each line of a doc comment is given as a
111
113
separate doc attribute, and this will combine them into a single string with
112
114
line breaks between each attribute.
113
- - ` unindent-comments ` is necessary because the convention for writing
115
+ - ` unindent-comments ` removes excess indentation on comments in order for
116
+ markdown to like it. This is necessary because the convention for writing
114
117
documentation is to provide a space between the ` /// ` or ` //! ` marker and the
115
118
text, and stripping that leading space will make the text easier to parse by
116
119
the Markdown parser. (In my experience it's less necessary now that we have a
117
120
Commonmark-compliant parser, since it doesn't have a problem with headers
118
121
that have a space before the ` ## ` that marks the heading.)
119
- - ` strip-priv-imports ` is necessary because rustdoc will handle * public*
122
+ - ` strip-priv-imports ` strips all private import statements (` use ` , `extern
123
+ crate`) from a crate. This is necessary because rustdoc will handle * public*
120
124
imports by either inlining the item's documentation to the module or creating
121
125
a "Reexports" section with the import in it. The pass ensures that all of
122
126
these imports are actually relevant to documentation.
123
- - ` strip-hidden ` and ` strip-private ` also remove items that are not relevant
124
- for public documentation.
127
+ - ` strip-hidden ` and ` strip-private ` strip all ` doc(hidden) ` and private items
128
+ from the output. ` strip-private ` implies ` strip-priv-imports ` . Basically, the
129
+ goal is to remove items that are not relevant for public documentation.
125
130
126
131
## From clean to crate
127
132
0 commit comments