/src/test/rustdoc/test-lists.rs

https://gitlab.com/jianglu/rust · Rust · 36 lines · 3 code · 3 blank · 30 comment · 0 complexity · 7f2502f63ccd129c0d5dc17b6d991221 MD5 · raw file

  1. // Copyright 2017 The Rust Project Developers. See the COPYRIGHT
  2. // file at the top-level directory of this distribution and at
  3. // http://rust-lang.org/COPYRIGHT.
  4. //
  5. // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
  6. // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
  7. // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
  8. // option. This file may not be copied, modified, or distributed
  9. // except according to those terms.
  10. #![crate_name = "foo"]
  11. // @has foo/fn.f.html
  12. // @has - //ol/li "list"
  13. // @has - //ol/li/ol/li "fooooo"
  14. // @has - //ol/li/ol/li "x"
  15. // @has - //ol/li "foo"
  16. /// 1. list
  17. /// 1. fooooo
  18. /// 2. x
  19. /// 2. foo
  20. pub fn f() {}
  21. // @has foo/fn.foo2.html
  22. // @has - //ul/li "normal list"
  23. // @has - //ul/li/ul/li "sub list"
  24. // @has - //ul/li/ul/li "new elem still same elem and again same elem!"
  25. // @has - //ul/li "new big elem"
  26. /// * normal list
  27. /// * sub list
  28. /// * new elem
  29. /// still same elem
  30. ///
  31. /// and again same elem!
  32. /// * new big elem
  33. pub fn foo2() {}