mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
Add regression test for #108231
This commit is contained in:
parent
24b23aa958
commit
e2d9dee9eb
23
tests/rustdoc/issue-108231.rs
Normal file
23
tests/rustdoc/issue-108231.rs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// Regression test for <https://github.com/rust-lang/rust/issues/108231>.
|
||||||
|
// Macros with `#[macro_export]` attribute should be visible at the top level
|
||||||
|
// even if they are inside a doc hidden item.
|
||||||
|
|
||||||
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
|
// @has 'foo/index.html'
|
||||||
|
// @count - '//*[@id="main-content"]//a[@class="macro"]' 1
|
||||||
|
// @has - '//*[@id="main-content"]//a[@class="macro"]' 'foo'
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
|
pub mod __internal {
|
||||||
|
/// This one should be visible.
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! foo {
|
||||||
|
() => {};
|
||||||
|
}
|
||||||
|
|
||||||
|
/// This one should be hidden.
|
||||||
|
macro_rules! bar {
|
||||||
|
() => {};
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user