rust/src/test/rustdoc/doc-cfg-implicit-gate.rs
Wim Looman 10cdbd847f Make cfg implicitly imply doc(cfg)
This is only active when the `doc_cfg` feature is active.

The implicit cfg can be overridden via #[doc(cfg(...))], so e.g. to
hide a #[cfg] you can use something like:

```rust
 #[cfg(unix)]
 #[doc(cfg(all()))]
pub struct Unix;
```

(since `all()` is always true, it is never shown in the docs)
2021-10-05 17:25:44 +02:00

7 lines
214 B
Rust

// compile-flags:--cfg feature="worricow"
#![crate_name = "xenogenous"]
// @has 'xenogenous/struct.Worricow.html'
// @count - '//*[@class="stab portability"]' 0
#[cfg(feature = "worricow")]
pub struct Worricow;