diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-02-20 17:27:36 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-02-20 20:19:21 +0100 |
| commit | fc6a05c4639cd8d7ddae103f3d4795a70b2de199 (patch) | |
| tree | ebd7a8dd3a732f9426df740df3b5d5086da3a8a4 | |
| parent | e2d9dee9eb6520a542f3953154a3ae7a8996b3f1 (diff) | |
| download | rust-fc6a05c4639cd8d7ddae103f3d4795a70b2de199.tar.gz rust-fc6a05c4639cd8d7ddae103f3d4795a70b2de199.zip | |
Add test for reexported hidden macro
| -rw-r--r-- | tests/rustdoc/reexport-hidden-macro.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/rustdoc/reexport-hidden-macro.rs b/tests/rustdoc/reexport-hidden-macro.rs new file mode 100644 index 00000000000..afcfa979616 --- /dev/null +++ b/tests/rustdoc/reexport-hidden-macro.rs @@ -0,0 +1,22 @@ +// Ensure that inlined reexport of hidden macros is working as expected. +// Part of <https://github.com/rust-lang/rust/issues/59368>. + +#![crate_name = "foo"] + +// @has 'foo/index.html' +// @has - '//*[@id="main-content"]//a[@href="macro.Macro2.html"]' 'Macro2' + +// @has 'foo/macro.Macro2.html' +// @has - '//*[@class="docblock"]' 'Displayed' + +#[macro_export] +#[doc(hidden)] +macro_rules! foo { + () => {}; +} + +/// not displayed +pub use crate::foo as Macro; +/// Displayed +#[doc(inline)] +pub use crate::foo as Macro2; |
