forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#79455 - CraftSpider:master, r=jyn514
Remove doctree::Macro and distinguish between `macro_rules!` and `pub macro` This is a part of rust-lang#78082, removing doctree::Macro. Uses the changes in rust-lang#79372 Fixes rust-lang#76761
- Loading branch information
Showing
5 changed files
with
97 additions
and
43 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
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,39 @@ | ||
#![feature(decl_macro)] | ||
|
||
// @has decl_macro/macro.my_macro.html //pre 'pub macro my_macro() {' | ||
// @has - //pre '...' | ||
// @has - //pre '}' | ||
pub macro my_macro() { | ||
|
||
} | ||
|
||
// @has decl_macro/macro.my_macro_2.html //pre 'pub macro my_macro_2($($tok:tt)*) {' | ||
// @has - //pre '...' | ||
// @has - //pre '}' | ||
pub macro my_macro_2($($tok:tt)*) { | ||
|
||
} | ||
|
||
// @has decl_macro/macro.my_macro_multi.html //pre 'pub macro my_macro_multi {' | ||
// @has - //pre '(_) => { ... },' | ||
// @has - //pre '($foo:ident . $bar:expr) => { ... },' | ||
// @has - //pre '($($foo:literal),+) => { ... }' | ||
// @has - //pre '}' | ||
pub macro my_macro_multi { | ||
(_) => { | ||
|
||
}, | ||
($foo:ident . $bar:expr) => { | ||
|
||
}, | ||
($($foo:literal),+) => { | ||
|
||
} | ||
} | ||
|
||
// @has decl_macro/macro.by_example_single.html //pre 'pub macro by_example_single($foo:expr) {' | ||
// @has - //pre '...' | ||
// @has - //pre '}' | ||
pub macro by_example_single { | ||
($foo:expr) => {} | ||
} |
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,14 @@ | ||
// compile-flags: --document-private-items | ||
|
||
#![feature(decl_macro)] | ||
|
||
// @has decl_macro_priv/macro.crate_macro.html //pre 'pub(crate) macro crate_macro() {' | ||
// @has - //pre '...' | ||
// @has - //pre '}' | ||
pub(crate) macro crate_macro() {} | ||
|
||
// @has decl_macro_priv/macro.priv_macro.html //pre 'macro priv_macro() {' | ||
// @!has - //pre 'pub macro priv_macro() {' | ||
// @has - //pre '...' | ||
// @has - //pre '}' | ||
macro priv_macro() {} |