@@ -215,7 +215,7 @@ Since primitive types are defined in the compiler, there's no place to attach do
215
215
attributes. This attribute is used by the standard library to provide a way to generate
216
216
documentation for primitive types.
217
217
218
- ## ` #[cfg(rustdoc )] ` : Documenting platform-/feature-specific information
218
+ ## ` #[cfg(doc )] ` : Documenting platform-/feature-specific information
219
219
220
220
For conditional compilation, Rustdoc treats your crate the same way the compiler does: Only things
221
221
from 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
224
224
provide.
225
225
226
226
If 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
228
228
anything 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 ))] ` .
230
230
This will preserve the item either when built normally on Windows, or when being documented
231
231
anywhere.
232
232
@@ -236,10 +236,10 @@ Example:
236
236
237
237
``` rust
238
238
/// Token struct that can only be used on Windows.
239
- #[cfg(any(windows, rustdoc ))]
239
+ #[cfg(any(windows, doc ))]
240
240
pub struct WindowsToken ;
241
241
/// Token struct that can only be used on Unix.
242
- #[cfg(any(unix, rustdoc ))]
242
+ #[cfg(any(unix, doc ))]
243
243
pub struct UnixToken ;
244
244
```
245
245
0 commit comments