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

rustdoc: Add more semantic information to impl IDs #98939

Merged
merged 4 commits into from
Jul 6, 2022

Conversation

GuillaumeGomez
Copy link
Member

Take over of #92745.

I fixed the last remaining issue for the links in the sidebar (mentioned by @jsha) and fixed the few links broken in the std/core docs.

cc @camelid
r? @notriddle

@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jul 5, 2022
@rustbot
Copy link
Collaborator

rustbot commented Jul 5, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 5, 2022
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented Jul 5, 2022

Fixed formatting error.

@rust-log-analyzer

This comment has been minimized.

Instead of generating `#impl`, `#impl-1`, etc., generate IDs
like `#impl-Foo<M>`.

Co-authored-by: Noah Lev <camelidcamel@gmail.com>
@GuillaumeGomez
Copy link
Member Author

And rebased on master.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

And now the GUI tests...

@notriddle
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 6, 2022

📌 Commit 53db831 has been approved by notriddle

@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 Jul 6, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 6, 2022
…laumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#96935 (Allow arithmetic and certain bitwise ops on AtomicPtr)
 - rust-lang#98519 (Replace some `guess_head_span` with `def_span`)
 - rust-lang#98911 (rustdoc: filter '_ lifetimes from ty::Generics)
 - rust-lang#98939 (rustdoc: Add more semantic information to impl IDs)
 - rust-lang#98971 (Fix typo in file descriptor docs)
 - rust-lang#98983 (docs: Add overview of `rustc_middle::mir::TerminatorKind`)
 - rust-lang#98984 (Remove erroneous doc comment)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 77ec591 into rust-lang:master Jul 6, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 6, 2022
@GuillaumeGomez GuillaumeGomez deleted the rustdoc-disamb-impls branch July 7, 2022 10:55
@pierwill
Copy link
Member

pierwill commented Jul 7, 2022

Thanks so much for this, @GuillaumeGomez! 🙏

@GuillaumeGomez
Copy link
Member Author

Thanks for starting it. I didn't have much to do in the end so you were quite close. 😉

nars1 pushed a commit to YottaDB/YDBRust that referenced this pull request Sep 29, 2022
**Change**
* Pipeline job `pages` started failing because of the error shown below
  ```
  Found invalid urls in struct.Context.html:
	  Fragment #impl-Display at struct.YDBError.html does not exist!
  ```
* This error is from execution of `cargo deadlinks` command
* This error is due to the fact that implementation of trait `fmt::Display` for `YDBError` was not found at fragment `impl-Display` of `struct.YDBError.html`
* This error started occuring with the `rust version 1.64.0 (a55dd71d5 2022-09-19)` and not before. The previous version as seen in pipeline jobs previous to this failure is `1.63.0 (4b91a6ea7 2022-08-08)`
* When attempted to generate the docs locally it was found that the documentation for `Display` with the new rust version (1.64.0) was seen at fragment `impl-Display-for-YDBError`
* Changing the fragment part in rustdoc solved the issue
* The following pull request seems to have introduced this change to rustdoc rust-lang/rust#98939 (rustdoc: Add more semantic information to impl IDs #98939) and this is the issue on github related to this change -> rust-lang/rust#92052 (rustdoc: Semantically disambiguate impls and associated impl items rather than using numeric suffixes #92052)

**Misc**
* @jsikri94 found another issue where the intra-doc link format was broken. This change also fixed the issue.
  * Previous to this change following line was seen in docs : `ci_t! and cip_t! cip_t!: crate::cip_t! ci_t!: crate::ci_t!`
  * After this change it is replaced by : `ci_t! and cip_t!`
  * The fix was to include an empty line between the intra link and its definition. As it was absent both the lines were being combined into one as seen above in the first sub-point. With the empty line the line seen in docs is fixed and is seen as shown by the second sub-point above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

7 participants