-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add more comments to explain the code to generate the search index #90795
Conversation
src/librustdoc/html/render/cache.rs
Outdated
@@ -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). |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
a3aedda
to
9c05335
Compare
I extended the comment and tried to make it more clear. Please tell me if it's too much or still unclear. |
@bors: r=notriddle rollup |
📌 Commit 9c05335 has been approved by |
…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
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