/src/test/rustdoc/short-docblock.rs

https://gitlab.com/rust-lang/rust · Rust · 25 lines · 4 code · 6 blank · 15 comment · 0 complexity · a8512e3c945d962bb0ca8195cc2f86de MD5 · raw file

  1. #![crate_name = "foo"]
  2. // @has foo/index.html '//*[@class="item-right docblock-short"]/p' 'fooo'
  3. // @!has foo/index.html '//*[@class="item-right docblock-short"]/p/h1' 'fooo'
  4. // @has foo/fn.foo.html '//h2[@id="fooo"]/a[@href="#fooo"]' 'fooo'
  5. /// # fooo
  6. ///
  7. /// foo
  8. pub fn foo() {}
  9. // @has foo/index.html '//*[@class="item-right docblock-short"]/p' 'mooood'
  10. // @!has foo/index.html '//*[@class="item-right docblock-short"]/p/h2' 'mooood'
  11. // @has foo/foo/index.html '//h3[@id="mooood"]/a[@href="#mooood"]' 'mooood'
  12. /// ## mooood
  13. ///
  14. /// foo mod
  15. pub mod foo {}
  16. // @has foo/index.html '//*[@class="item-right docblock-short"]/p/a[@href=\
  17. // "https://nougat.world"]/code' 'nougat'
  18. /// [`nougat`](https://nougat.world)
  19. pub struct Bar;