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 more comments to explain the code to generate the search index #90795

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

GuillaumeGomez
Copy link
Member

Fixes #90766.

I tried to put comments when the code wasn't easy to understand at first sight and added more documentation on the recursive function. Please tell me if I misused the terminology or if comments can be improved or added into other places.

r? @notriddle

@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Nov 11, 2021
@@ -360,6 +366,7 @@ crate fn get_real_types<'tcx>(
insert_ty(res, tcx, arg.clone(), ty_generics);
}
} else {
// This is not a type parameter so we can add it directly (and look for its trait bounds).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do things that aren’t type parameters have trait bounds, or are we talking about its own nested type parameters.

Copy link
Member Author

@GuillaumeGomez GuillaumeGomez Nov 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh damn, I was talking about its own nested type parameters. Good catch! I'll try to extend the comment to make it more explicit too while I'm at it.

@GuillaumeGomez
Copy link
Member Author

I extended the comment and tried to make it more clear. Please tell me if it's too much or still unclear.

@GuillaumeGomez
Copy link
Member Author

@bors: r=notriddle rollup

@bors
Copy link
Contributor

bors commented Nov 12, 2021

📌 Commit 9c05335 has been approved by notriddle

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 12, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 12, 2021
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#90589 (rustc_llvm: update PassWrapper for recent LLVM)
 - rust-lang#90644 (Extend the const swap feature)
 - rust-lang#90704 (Unix ExitStatus comments and a tiny docs fix)
 - rust-lang#90761 (Shorten Span of unused macro lints)
 - rust-lang#90795 (Add more comments to explain the code to generate the search index)
 - rust-lang#90798 (Document `unreachable!` custom panic message)
 - rust-lang#90826 (rustc_feature: Convert `BuiltinAttribute` from tuple to a struct)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f522f26 into rust-lang:master Nov 12, 2021
@rustbot rustbot added this to the 1.58.0 milestone Nov 12, 2021
@GuillaumeGomez GuillaumeGomez deleted the more-search-index-comments branch November 13, 2021 11:11
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.

Add code comments into src/librustdoc/html/render/cache.rs
4 participants