We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
doc(auto_cfg(hide())
1 parent 8187fe0 commit a295af1Copy full SHA for a295af1
text/000-rustdoc-cfgs-handling.md
@@ -147,6 +147,20 @@ But you cannot write:
147
#[doc(auto_cfg(hide(not(unix))))]
148
```
149
150
+So if we use `doc(auto_cfg(hide(unix)))`, it means it will hide all mentions of `unix`:
151
+
152
+```rust
153
+#[cfg(unix)] // nothing displayed
154
+#[cfg(any(unix))] // nothing displayed
155
+#[cfg(any(unix, windows))] // only `windows` displayed
156
+```
157
158
+However, it only impacts the `unix` cfg, not the feature:
159
160
161
+#[cfg(feature = "unix")] // `feature = "unix"` is displayed
162
163
164
If `cfg_auto(show(...))` and `cfg_auto(hide(...))` are used to show/hide a same `cfg` on a same item, it'll emit an error. Example:
165
166
```rust
0 commit comments