-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 #86523 - LeSeulArtichaut:macros-disambiguators, r=jyn514
Improvements to intra-doc link macro disambiguators A few small improvements around macro disambiguators: - display the link text as it was entered: previously `[macro!()]` would be displayed without the parantheses (fixes #86309) - support `!{}` and `![]` as macro disambiguators (fixes #86310) r? `@jyn514` cc `@Manishearth` `@camelid`
- Loading branch information
Showing
2 changed files
with
37 additions
and
27 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 @@ | ||
#![crate_name = "foo"] | ||
#![deny(rustdoc::broken_intra_doc_links)] | ||
|
||
//! [foo!()] | ||
// @has foo/index.html '//a[@href="macro.foo.html"]' 'foo!()' | ||
|
||
//! [foo!{}] | ||
// @has - '//a[@href="macro.foo.html"]' 'foo!{}' | ||
|
||
//! [foo![]](foo![]) | ||
// @has - '//a[@href="macro.foo.html"]' 'foo![]' | ||
|
||
//! [foo1](foo!()) | ||
// @has - '//a[@href="macro.foo.html"]' 'foo1' | ||
|
||
//! [foo2](foo!{}) | ||
// @has - '//a[@href="macro.foo.html"]' 'foo2' | ||
|
||
//! [foo3](foo![]) | ||
// @has - '//a[@href="macro.foo.html"]' 'foo3' | ||
|
||
#[macro_export] | ||
macro_rules! foo { | ||
() => {}; | ||
} |