diff options
| author | Andy Russell <arussell123@gmail.com> | 2019-03-09 16:32:07 -0500 |
|---|---|---|
| committer | Andy Russell <arussell123@gmail.com> | 2019-03-15 15:12:30 -0400 |
| commit | 7c66ae2fc5eb15a5f9b3c7a0b2e18528c54e88a6 (patch) | |
| tree | b7a331e2ecd47fcb675bd749b2efa905e97c821e /src | |
| parent | 150b49a582f06b26391a6de542e9d4bc12c9aa2d (diff) | |
| download | rust-7c66ae2fc5eb15a5f9b3c7a0b2e18528c54e88a6.tar.gz rust-7c66ae2fc5eb15a5f9b3c7a0b2e18528c54e88a6.zip | |
use `!` in macro disambiguation suggestion
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/passes/collect_intra_doc_links.rs | 3 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/intra-links-ambiguity.stderr | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs index b105e0a0b6f..0fa6b6baec7 100644 --- a/src/librustdoc/passes/collect_intra_doc_links.rs +++ b/src/librustdoc/passes/collect_intra_doc_links.rs @@ -528,6 +528,9 @@ fn ambiguity_error( Def::Method(..) | Def::Fn(..) => { ("add parentheses", format!("{}()", path_str)) } + Def::Macro(..) => { + ("add an exclamation mark", format!("{}!", path_str)) + } _ => { let type_ = match (def, ns) { (Def::Const(..), _) => "const", diff --git a/src/test/rustdoc-ui/intra-links-ambiguity.stderr b/src/test/rustdoc-ui/intra-links-ambiguity.stderr index 9793cd06fb0..5d66cc1364c 100644 --- a/src/test/rustdoc-ui/intra-links-ambiguity.stderr +++ b/src/test/rustdoc-ui/intra-links-ambiguity.stderr @@ -45,10 +45,10 @@ help: to link to the function, add parentheses | LL | /// [`multi_conflict()`] is a three-way conflict. | ^^^^^^^^^^^^^^^^^^ -help: to link to the macro, prefix with the item type +help: to link to the macro, add an exclamation mark | -LL | /// [`macro@multi_conflict`] is a three-way conflict. - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | /// [`multi_conflict!`] is a three-way conflict. + | ^^^^^^^^^^^^^^^^^ error: `type_and_value` is both a module and a constant --> $DIR/intra-links-ambiguity.rs:33:16 |
