Skip to content

Add list of supported disambiguators and suffixes for intra-doc links in the rustdoc book - #110348

Merged
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:disambiguators-suffixes-rustdoc-book
Apr 18, 2023
Merged

Add list of supported disambiguators and suffixes for intra-doc links in the rustdoc book#110348
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:disambiguators-suffixes-rustdoc-book

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

This information is otherwise only provided in case an error occurs, which isn't great.

r? @notriddle

@rustbotrustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 15, 2023
@jyn514

Copy link
Copy Markdown
Member

cc @Manishearth , I remember last time I suggested adding this you thought having it in the error messages was enough.

@jyn514jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name labels Apr 15, 2023
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

It's what I thought too and then I re-discovered the auto-disambiguation of trait and derive proc-macro and because of this, I think providing the list of disambiguators is now something we must provide.

But even before that, providing the list of disambiguators seems like something we should provide just so that people aren't surprised when they see them. Having an "official list" is always a good thing imo.

@notriddle

Copy link
Copy Markdown
Contributor

Here’s where the disambiguators are actually implemented:

https://github.com/rust-lang/rust/blob/master/src/librustdoc/passes/collect_intra_doc_links.rs#L1416

Perhaps add a comment there reminding anyone adding a new disambiguator to also update the book?

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Good idea!

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Added code comments.

Comment threadsrc/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md Outdated
Comment threadsrc/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md Outdated
@GuillaumeGomez
GuillaumeGomezforce-pushed the disambiguators-suffixes-rustdoc-book branch from bef32f4 to fbc7696CompareApril 16, 2023 11:25
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Updated as suggested.

Comment threadsrc/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md Outdated
@GuillaumeGomez
GuillaumeGomezforce-pushed the disambiguators-suffixes-rustdoc-book branch from fbc7696 to 1531c95CompareApril 17, 2023 09:09
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Applied suggestion.

@Manishearth

Copy link
Copy Markdown
Member

@bors r+ rollup

@bors

bors commented Apr 17, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 1531c95 has been approved by Manishearth

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 17, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 17, 2023
…ixes-rustdoc-book, r=Manishearth
Add list of supported disambiguators and suffixes for intra-doc links in the rustdoc book
This information is otherwise only provided in case an error occurs, which isn't great.
r? `@notriddle`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 17, 2023
…ixes-rustdoc-book, r=Manishearth
Add list of supported disambiguators and suffixes for intra-doc links in the rustdoc book
This information is otherwise only provided in case an error occurs, which isn't great.
r? ``@notriddle``
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 18, 2023
…iaskrgr
Rollup of 7 pull requests
Successful merges:
- rust-lang#109981 (Set commit information environment variables when building tools)
- rust-lang#110348 (Add list of supported disambiguators and suffixes for intra-doc links in the rustdoc book)
- rust-lang#110409 (Don't use `serde_json` to serialize a simple JSON object)
- rust-lang#110442 (Avoid including dry run steps in the build metrics)
- rust-lang#110450 (rustdoc: Fix invalid handling of nested items with `--document-private-items`)
- rust-lang#110461 (Use `Item::expect_*` and `ImplItem::expect_*` more)
- rust-lang#110465 (Assure everyone that `has_type_flags` is fast)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit afea84f into rust-lang:masterApr 18, 2023
@rustbotrustbot added this to the 1.71.0 milestone Apr 18, 2023
@GuillaumeGomez
GuillaumeGomez deleted the disambiguators-suffixes-rustdoc-book branch April 18, 2023 08:23
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@GuillaumeGomez@jyn514@notriddle@Manishearth@bors@rustbot