forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
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 rust-lang#107897 - GuillaumeGomez:reexported-macros-d…
…ocs, r=notriddle Reexported macros docs Part of rust-lang#59368 (doesn't fix it, only improve the current situation a bit). Macros were not correctly handled in reexports and the reexport attributes were not merged with the item either. This PR fixes both. r? `@notriddle`
- Loading branch information
Showing
3 changed files
with
29 additions
and
4 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
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,23 @@ | ||
// Ensure that macros are correctly reexported and that they get both the comment from the | ||
// `pub use` and from the macro. | ||
|
||
#![crate_name = "foo"] | ||
|
||
// @has 'foo/macro.foo.html' | ||
// @!has - '//*[@class="toggle top-doc"]/*[@class="docblock"]' 'x y' | ||
// @has - '//*[@class="toggle top-doc"]/*[@class="docblock"]' 'y' | ||
#[macro_use] | ||
mod my_module { | ||
/// y | ||
#[macro_export] | ||
macro_rules! foo { | ||
() => (); | ||
} | ||
} | ||
|
||
// @has 'foo/another_mod/macro.bar.html' | ||
// @has - '//*[@class="toggle top-doc"]/*[@class="docblock"]' 'x y' | ||
pub mod another_mod { | ||
/// x | ||
pub use crate::foo as bar; | ||
} |