/src/test/rustdoc/doc-cfg-hide.rs

https://gitlab.com/rust-lang/rust · Rust · 32 lines · 13 code · 5 blank · 14 comment · 0 complexity · b92861e4ef145714839b51466621edc9 MD5 · raw file

  1. #![crate_name = "oud"]
  2. #![feature(doc_auto_cfg, doc_cfg, doc_cfg_hide)]
  3. #![doc(cfg_hide(feature = "solecism"))]
  4. // @has 'oud/struct.Solecism.html'
  5. // @count - '//*[@class="stab portability"]' 0
  6. // compile-flags:--cfg feature="solecism"
  7. #[cfg(feature = "solecism")]
  8. pub struct Solecism;
  9. // @has 'oud/struct.Scribacious.html'
  10. // @count - '//*[@class="stab portability"]' 1
  11. // @matches - '//*[@class="stab portability"]' 'crate feature solecism'
  12. #[cfg(feature = "solecism")]
  13. #[doc(cfg(feature = "solecism"))]
  14. pub struct Scribacious;
  15. // @has 'oud/struct.Hyperdulia.html'
  16. // @count - '//*[@class="stab portability"]' 1
  17. // @matches - '//*[@class="stab portability"]' 'crate feature hyperdulia'
  18. // compile-flags:--cfg feature="hyperdulia"
  19. #[cfg(feature = "solecism")]
  20. #[cfg(feature = "hyperdulia")]
  21. pub struct Hyperdulia;
  22. // @has 'oud/struct.Oystercatcher.html'
  23. // @count - '//*[@class="stab portability"]' 1
  24. // @matches - '//*[@class="stab portability"]' 'crate feature oystercatcher only'
  25. // compile-flags:--cfg feature="oystercatcher"
  26. #[cfg(all(feature = "solecism", feature = "oystercatcher"))]
  27. pub struct Oystercatcher;