/src/test/rustdoc/redirect-rename.rs

https://gitlab.com/rust-lang/rust · Rust · 34 lines · 17 code · 4 blank · 13 comment · 0 complexity · e9829ccc71f2dc51bcbf7c4d5a446518 MD5 · raw file

  1. #![crate_name = "foo"]
  2. mod hidden {
  3. // @has foo/hidden/struct.Foo.html
  4. // @has - '//p/a' '../../foo/struct.FooBar.html'
  5. pub struct Foo {}
  6. pub union U { a: usize }
  7. pub enum Empty {}
  8. pub const C: usize = 1;
  9. pub static S: usize = 1;
  10. // @has foo/hidden/bar/index.html
  11. // @has - '//p/a' '../../foo/baz/index.html'
  12. pub mod bar {
  13. // @has foo/hidden/bar/struct.Thing.html
  14. // @has - '//p/a' '../../foo/baz/struct.Thing.html'
  15. pub struct Thing {}
  16. }
  17. }
  18. // @has foo/struct.FooBar.html
  19. pub use hidden::Foo as FooBar;
  20. // @has foo/union.FooU.html
  21. pub use hidden::U as FooU;
  22. // @has foo/enum.FooEmpty.html
  23. pub use hidden::Empty as FooEmpty;
  24. // @has foo/constant.FooC.html
  25. pub use hidden::C as FooC;
  26. // @has foo/static.FooS.html
  27. pub use hidden::S as FooS;
  28. // @has foo/baz/index.html
  29. // @has foo/baz/struct.Thing.html
  30. pub use hidden::bar as baz;