Rollup merge of #73791 - Manishearth:parens-intra-doc, r=GuillaumeGomez,jyn514
Allow for parentheses after macro intra-doc-links None
This commit is contained in:
commit
d163524cf4
@ -602,6 +602,9 @@ fn fold_item(&mut self, mut item: Item) -> Option<Item> {
|
||||
kind = Some(ValueNS);
|
||||
disambiguator = Some(&prefix[..prefix.len() - 1]);
|
||||
link.trim_start_matches(prefix)
|
||||
} else if link.ends_with("!()") {
|
||||
kind = Some(MacroNS);
|
||||
link.trim_end_matches("!()")
|
||||
} else if link.ends_with("()") {
|
||||
kind = Some(ValueNS);
|
||||
disambiguator = Some("fn");
|
||||
|
@ -46,6 +46,8 @@ macro_rules! this_macro {
|
||||
() => {};
|
||||
}
|
||||
|
||||
// @has intra_links/struct.ThisType.html '//a/@href' '../intra_links/macro.this_macro.html'
|
||||
/// another link to [`this_macro!()`]
|
||||
pub struct ThisType;
|
||||
|
||||
impl ThisType {
|
||||
@ -70,7 +72,7 @@ pub trait SoAmbiguous {}
|
||||
pub fn SoAmbiguous() {}
|
||||
|
||||
|
||||
// @has - '//a/@href' '../intra_links/struct.ThisType.html'
|
||||
// @has intra_links/struct.SomeOtherType.html '//a/@href' '../intra_links/struct.ThisType.html'
|
||||
// @has - '//a/@href' '../intra_links/struct.ThisType.html#method.this_method'
|
||||
// @has - '//a/@href' '../intra_links/enum.ThisEnum.html'
|
||||
// @has - '//a/@href' '../intra_links/enum.ThisEnum.html#variant.ThisVariant'
|
||||
|
Loading…
Reference in New Issue
Block a user