diff options
| author | bors <bors@rust-lang.org> | 2023-04-14 19:38:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-14 19:38:08 +0000 |
| commit | 84dd17b56a931a631a23dfd5ef2018fd3ef49108 (patch) | |
| tree | 54bf25e0b3e1f48be94752b14fadd46ed7dbed25 /src/doc | |
| parent | 276fa294809e914b1d04192392d256814aa5ce1a (diff) | |
| parent | 0d97522ee751cf485f3daf621bcc0ff1e6771f0f (diff) | |
| download | rust-84dd17b56a931a631a23dfd5ef2018fd3ef49108.tar.gz rust-84dd17b56a931a631a23dfd5ef2018fd3ef49108.zip | |
Auto merge of #110331 - matthiaskrgr:rollup-9vldvow, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #108687 (Reformulate `point_at_expr_source_of_inferred_type` to be more accurate) - #109272 (Add Command environment variable inheritance docs) - #109947 (Add links from `core::cmp` derives to their traits) - #110110 (Use `Display` in top-level example for `PanicInfo`) - #110154 (Fix typos in library) - #110244 (Remove some unneeded imports / qualified paths) - #110328 ([rustdoc] Add explanations for auto-disambiguation when an intra doc link is resolved to a proc-macro and a trait at the same time) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md b/src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md index 36bc312b9c9..eb2285ef906 100644 --- a/src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md +++ b/src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md @@ -103,6 +103,13 @@ macro_rules! foo { } ``` +There is one case where the disambiguation will be performed automatically: if an intra doc +link is resolved at the same time as a trait and as a derive proc-macro. In this case, it'll +always generate a link to the trait and not emit a "missing disambiguation" warning. A good +example of this case is when you link to the `Clone` trait: there is also a `Clone` +proc-macro but it ignores it in this case. If you want to link to the proc-macro, you can +use the `macro@` disambiguator. + ## Warnings, re-exports, and scoping Links are resolved in the scope of the module where the item is defined, even |
