/src/test/rustdoc/primitive.rs

https://gitlab.com/rust-lang/rust · Rust · 21 lines · 6 code · 3 blank · 12 comment · 0 complexity · 5fe073f780ef184e74f73e3429445e93 MD5 · raw file

  1. #![crate_name = "foo"]
  2. #![feature(rustdoc_internals)]
  3. // @has foo/index.html '//h2[@id="primitives"]' 'Primitive Types'
  4. // @has foo/index.html '//a[@href="primitive.i32.html"]' 'i32'
  5. // @has foo/index.html '//div[@class="sidebar-elems"]//li/a' 'Primitive Types'
  6. // @has foo/index.html '//div[@class="sidebar-elems"]//li/a/@href' '#primitives'
  7. // @has foo/primitive.i32.html '//a[@class="primitive"]' 'i32'
  8. // @has foo/primitive.i32.html '//span[@class="in-band"]' 'Primitive Type i32'
  9. // @has foo/primitive.i32.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!'
  10. // @has foo/index.html '//a/@href' '../foo/index.html'
  11. // @!has foo/index.html '//span' '🔒'
  12. #[doc(primitive = "i32")]
  13. /// this is a test!
  14. mod i32{}
  15. // @has foo/primitive.bool.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'hello'
  16. #[doc(primitive = "bool")]
  17. /// hello
  18. mod bool {}