@@ -215,7 +215,7 @@ Since primitive types are defined in the compiler, there's no place to attach do
215215attributes. This attribute is used by the standard library to provide a way to generate
216216documentation for primitive types.
217217
218- ## ` #[cfg(rustdoc )] ` : Documenting platform-/feature-specific information
218+ ## ` #[cfg(doc )] ` : Documenting platform-/feature-specific information
219219
220220For conditional compilation, Rustdoc treats your crate the same way the compiler does: Only things
221221from the host target are available (or from the given ` --target ` if present), and everything else is
@@ -224,9 +224,9 @@ on different targets and you want your documentation to reflect all the availabl
224224provide.
225225
226226If you want to make sure an item is seen by Rustdoc regardless of what platform it's targeting,
227- you can apply ` #[cfg(rustdoc )] ` to it. Rustdoc sets this whenever it's building documentation, so
227+ you can apply ` #[cfg(doc )] ` to it. Rustdoc sets this whenever it's building documentation, so
228228anything that uses that flag will make it into documentation it generates. To apply this to an item
229- with other ` #[cfg] ` filters on it, you can write something like ` #[cfg(any(windows, rustdoc ))] ` .
229+ with other ` #[cfg] ` filters on it, you can write something like ` #[cfg(any(windows, doc ))] ` .
230230This will preserve the item either when built normally on Windows, or when being documented
231231anywhere.
232232
@@ -236,10 +236,10 @@ Example:
236236
237237``` rust
238238/// Token struct that can only be used on Windows.
239- #[cfg(any(windows, rustdoc ))]
239+ #[cfg(any(windows, doc ))]
240240pub struct WindowsToken ;
241241/// Token struct that can only be used on Unix.
242- #[cfg(any(unix, rustdoc ))]
242+ #[cfg(any(unix, doc ))]
243243pub struct UnixToken ;
244244```
245245
0 commit comments