Skip to content

Commit fec6ad6

Browse files
Add regression test for #108281
1 parent f58c8ab commit fec6ad6

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/rustdoc/issue-108281.rs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Regression test for <https://github.com/rust-lang/rust/issues/108281>.
2+
// It ensures that the attributes on the first reexport are not duplicated.
3+
4+
#![crate_name = "foo"]
5+
6+
// @has 'foo/index.html'
7+
8+
#[doc(hidden)]
9+
pub fn bar() {}
10+
mod sub {
11+
pub fn public() {}
12+
}
13+
14+
// @matches - '//*[@class="desc docblock-short"]' '^Displayed$'
15+
/// Displayed
16+
#[doc(inline)]
17+
pub use crate::bar as Bar;
18+
// @matches - '//*[@class="desc docblock-short"]' '^Hello\sDisplayed$'
19+
#[doc(inline)]
20+
/// Hello
21+
pub use crate::Bar as Bar2;
22+
23+
// @matches - '//*[@class="desc docblock-short"]' '^Public$'
24+
/// Public
25+
pub use crate::sub::public as Public;

0 commit comments

Comments
 (0)