-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly handle multiple re-exports of bang macros at the same level
- Loading branch information
1 parent
c908d1e
commit 898dfc6
Showing
3 changed files
with
52 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,42 @@ | ||
// This test ensures that all re-exports of doc hidden elements are displayed. | ||
|
||
#![crate_name = "foo"] | ||
|
||
#[doc(hidden)] | ||
pub struct Bar; | ||
|
||
#[macro_export] | ||
#[doc(hidden)] | ||
macro_rules! foo { | ||
() => {}; | ||
} | ||
|
||
// @has 'foo/index.html' | ||
// @has - '//*[@id="reexport.Macro"]/code' 'pub use crate::foo as Macro;' | ||
pub use crate::foo as Macro; | ||
// @has - '//*[@id="reexport.Macro2"]/code' 'pub use crate::foo as Macro2;' | ||
pub use crate::foo as Macro2; | ||
// @has - '//*[@id="reexport.Boo"]/code' 'pub use crate::Bar as Boo;' | ||
pub use crate::Bar as Boo; | ||
// @has - '//*[@id="reexport.Boo2"]/code' 'pub use crate::Bar as Boo2;' | ||
pub use crate::Bar as Boo2; | ||
|
||
pub fn fofo() {} | ||
|
||
// @has - '//*[@id="reexport.f1"]/code' 'pub use crate::fofo as f1;' | ||
pub use crate::fofo as f1; | ||
// @has - '//*[@id="reexport.f2"]/code' 'pub use crate::fofo as f2;' | ||
pub use crate::fofo as f2; | ||
|
||
pub mod sub { | ||
// @has 'foo/sub/index.html' | ||
// @has - '//*[@id="reexport.Macro"]/code' 'pub use crate::foo as Macro;' | ||
pub use crate::foo as Macro; | ||
// @has - '//*[@id="reexport.Macro2"]/code' 'pub use crate::foo as Macro2;' | ||
pub use crate::foo as Macro2; | ||
|
||
// @has - '//*[@id="reexport.f1"]/code' 'pub use crate::fofo as f1;' | ||
pub use crate::fofo as f1; | ||
// @has - '//*[@id="reexport.f2"]/code' 'pub use crate::fofo as f2;' | ||
pub use crate::fofo as f2; | ||
} |