Allow for parentheses after macro intra-doc-links

This commit is contained in:
Manish Goregaokar 2020-06-27 00:22:03 -07:00
parent 5db778affe
commit 08d3a74a8f

View file

@ -602,6 +602,9 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
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");