-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #108310 - GuillaumeGomez:fix-reexports-duplicated-att…
…ributes, r=notriddle rustdoc: Fix duplicated attributes for first reexport Fixes #108281. r? ``@notriddle``
- Loading branch information
Showing
2 changed files
with
42 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Regression test for <https://github.com/rust-lang/rust/issues/108281>. | ||
// It ensures that the attributes on the first reexport are not duplicated. | ||
|
||
#![crate_name = "foo"] | ||
|
||
// @has 'foo/index.html' | ||
|
||
#[doc(hidden)] | ||
pub fn bar() {} | ||
mod sub { | ||
pub fn public() {} | ||
} | ||
|
||
// @matches - '//*[@class="desc docblock-short"]' '^Displayed$' | ||
/// Displayed | ||
#[doc(inline)] | ||
pub use crate::bar as Bar; | ||
// @matches - '//*[@class="desc docblock-short"]' '^Hello\sDisplayed$' | ||
#[doc(inline)] | ||
/// Hello | ||
pub use crate::Bar as Bar2; | ||
|
||
// @matches - '//*[@class="desc docblock-short"]' '^Public$' | ||
/// Public | ||
pub use crate::sub::public as Public; |