Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
453b51a65ab00939d2dce3de24ce38489b5c7eb6
rust/tests/rustdoc/doc-cfg-implicit-gate.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
215 B
Rust
Raw Normal View History

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)
2020-11-03 19:45:16 +01:00
//@ compile-flags:--cfg feature="worricow"
#![crate_name = "xenogenous"]
Update `tests/rustdoc` to new test syntax
2024-06-21 14:03:08 +02:00
//@ has 'xenogenous/struct.Worricow.html'
//@ count - '//*[@class="stab portability"]' 0
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)
2020-11-03 19:45:16 +01:00
#[cfg(feature = "worricow")]
pub struct Worricow;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 600ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API