/src/test/rustdoc/reexports.rs

https://gitlab.com/rust-lang/rust · Rust · 129 lines · 60 code · 14 blank · 55 comment · 0 complexity · a949dd1acf41418f631ff03ec5ba1e30 MD5 · raw file

  1. // aux-build: reexports.rs
  2. #![crate_name = "foo"]
  3. extern crate reexports;
  4. // @has 'foo/macro.addr_of.html' '//*[@class="docblock item-decl"]' 'pub macro addr_of($place:expr) {'
  5. pub use reexports::addr_of;
  6. // @!has 'foo/macro.addr_of_crate.html'
  7. pub(crate) use reexports::addr_of_crate;
  8. // @!has 'foo/macro.addr_of_self.html'
  9. pub(self) use reexports::addr_of_self;
  10. // @!has 'foo/macro.addr_of_local.html'
  11. use reexports::addr_of_local;
  12. // @has 'foo/struct.Foo.html' '//*[@class="docblock item-decl"]' 'pub struct Foo;'
  13. pub use reexports::Foo;
  14. // @!has 'foo/struct.FooCrate.html'
  15. pub(crate) use reexports::FooCrate;
  16. // @!has 'foo/struct.FooSelf.html'
  17. pub(self) use reexports::FooSelf;
  18. // @!has 'foo/struct.FooLocal.html'
  19. use reexports::FooLocal;
  20. // @has 'foo/enum.Bar.html' '//*[@class="docblock item-decl"]' 'pub enum Bar {'
  21. pub use reexports::Bar;
  22. // @!has 'foo/enum.BarCrate.html'
  23. pub(crate) use reexports::BarCrate;
  24. // @!has 'foo/enum.BarSelf.html'
  25. pub(self) use reexports::BarSelf;
  26. // @!has 'foo/enum.BarLocal.html'
  27. use reexports::BarLocal;
  28. // @has 'foo/fn.foo.html' '//*[@class="rust fn"]' 'pub fn foo()'
  29. pub use reexports::foo;
  30. // @!has 'foo/fn.foo_crate.html'
  31. pub(crate) use reexports::foo_crate;
  32. // @!has 'foo/fn.foo_self.html'
  33. pub(self) use reexports::foo_self;
  34. // @!has 'foo/fn.foo_local.html'
  35. use reexports::foo_local;
  36. // @has 'foo/type.Type.html' '//*[@class="rust typedef"]' 'pub type Type ='
  37. pub use reexports::Type;
  38. // @!has 'foo/type.TypeCrate.html'
  39. pub(crate) use reexports::TypeCrate;
  40. // @!has 'foo/type.TypeSelf.html'
  41. pub(self) use reexports::TypeSelf;
  42. // @!has 'foo/type.TypeLocal.html'
  43. use reexports::TypeLocal;
  44. // @has 'foo/union.Union.html' '//*[@class="docblock item-decl"]' 'pub union Union {'
  45. pub use reexports::Union;
  46. // @!has 'foo/union.UnionCrate.html'
  47. pub(crate) use reexports::UnionCrate;
  48. // @!has 'foo/union.UnionSelf.html'
  49. pub(self) use reexports::UnionSelf;
  50. // @!has 'foo/union.UnionLocal.html'
  51. use reexports::UnionLocal;
  52. pub mod outer {
  53. pub mod inner {
  54. // @has 'foo/outer/inner/macro.addr_of.html' '//*[@class="docblock item-decl"]' 'pub macro addr_of($place:expr) {'
  55. pub use reexports::addr_of;
  56. // @!has 'foo/outer/inner/macro.addr_of_crate.html'
  57. pub(crate) use reexports::addr_of_crate;
  58. // @!has 'foo/outer/inner/macro.addr_of_super.html'
  59. pub(super) use reexports::addr_of_super;
  60. // @!has 'foo/outer/inner/macro.addr_of_self.html'
  61. pub(self) use reexports::addr_of_self;
  62. // @!has 'foo/outer/inner/macro.addr_of_local.html'
  63. use reexports::addr_of_local;
  64. // @has 'foo/outer/inner/struct.Foo.html' '//*[@class="docblock item-decl"]' 'pub struct Foo;'
  65. pub use reexports::Foo;
  66. // @!has 'foo/outer/inner/struct.FooCrate.html'
  67. pub(crate) use reexports::FooCrate;
  68. // @!has 'foo/outer/inner/struct.FooSuper.html'
  69. pub(super) use reexports::FooSuper;
  70. // @!has 'foo/outer/inner/struct.FooSelf.html'
  71. pub(self) use reexports::FooSelf;
  72. // @!has 'foo/outer/inner/struct.FooLocal.html'
  73. use reexports::FooLocal;
  74. // @has 'foo/outer/inner/enum.Bar.html' '//*[@class="docblock item-decl"]' 'pub enum Bar {'
  75. pub use reexports::Bar;
  76. // @!has 'foo/outer/inner/enum.BarCrate.html'
  77. pub(crate) use reexports::BarCrate;
  78. // @!has 'foo/outer/inner/enum.BarSuper.html'
  79. pub(super) use reexports::BarSuper;
  80. // @!has 'foo/outer/inner/enum.BarSelf.html'
  81. pub(self) use reexports::BarSelf;
  82. // @!has 'foo/outer/inner/enum.BarLocal.html'
  83. use reexports::BarLocal;
  84. // @has 'foo/outer/inner/fn.foo.html' '//*[@class="rust fn"]' 'pub fn foo()'
  85. pub use reexports::foo;
  86. // @!has 'foo/outer/inner/fn.foo_crate.html'
  87. pub(crate) use reexports::foo_crate;
  88. // @!has 'foo/outer/inner/fn.foo_super.html'
  89. pub(super) use::reexports::foo_super;
  90. // @!has 'foo/outer/inner/fn.foo_self.html'
  91. pub(self) use reexports::foo_self;
  92. // @!has 'foo/outer/inner/fn.foo_local.html'
  93. use reexports::foo_local;
  94. // @has 'foo/outer/inner/type.Type.html' '//*[@class="rust typedef"]' 'pub type Type ='
  95. pub use reexports::Type;
  96. // @!has 'foo/outer/inner/type.TypeCrate.html'
  97. pub(crate) use reexports::TypeCrate;
  98. // @!has 'foo/outer/inner/type.TypeSuper.html'
  99. pub(super) use reexports::TypeSuper;
  100. // @!has 'foo/outer/inner/type.TypeSelf.html'
  101. pub(self) use reexports::TypeSelf;
  102. // @!has 'foo/outer/inner/type.TypeLocal.html'
  103. use reexports::TypeLocal;
  104. // @has 'foo/outer/inner/union.Union.html' '//*[@class="docblock item-decl"]' 'pub union Union {'
  105. pub use reexports::Union;
  106. // @!has 'foo/outer/inner/union.UnionCrate.html'
  107. pub(crate) use reexports::UnionCrate;
  108. // @!has 'foo/outer/inner/union.UnionSuper.html'
  109. pub(super) use reexports::UnionSuper;
  110. // @!has 'foo/outer/inner/union.UnionSelf.html'
  111. pub(self) use reexports::UnionSelf;
  112. // @!has 'foo/outer/inner/union.UnionLocal.html'
  113. use reexports::UnionLocal;
  114. }
  115. }