Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

GuillaumeGomez
Copy link
Member

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

r? @notriddle

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

jyn514 commented Apr 15, 2023

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

@jyn514 jyn514 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
Member Author

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
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
Member Author

Good idea!

@GuillaumeGomez
Copy link
Member Author

Added code comments.

@GuillaumeGomez GuillaumeGomez force-pushed the disambiguators-suffixes-rustdoc-book branch from bef32f4 to fbc7696 Compare April 16, 2023 11:25
@GuillaumeGomez
Copy link
Member Author

Updated as suggested.

@GuillaumeGomez GuillaumeGomez force-pushed the disambiguators-suffixes-rustdoc-book branch from fbc7696 to 1531c95 Compare April 17, 2023 09:09
@GuillaumeGomez
Copy link
Member Author

Applied suggestion.

@Manishearth
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 17, 2023

📌 Commit 1531c95 has been approved by Manishearth

It is now in the queue for this repository.

@bors bors 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:master Apr 18, 2023
@rustbot rustbot 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant 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