Remove potential useless data for search index#90727
Conversation
|
(I can't seem to assign @notriddle for some reason, even though they show up in the assignment selection box...) |
|
The terminology here seems a bit confusing, though. Especially the term "full generic" seems to only appear in rustdoc: It's getting increasingly hard to keep track of exactly when, if this code says the word "generic", is it referring to: Just trying to translate this thing into terminology that is a bit more specific:
|
By "opaque type", do you mean "type parameter"? An opaque type is |
|
But I agree rustdoc's terminology is very confusing; I think we should really just use rustc's terminology. So "type parameter", not "full generic", and "(trait) bounds", not "generics on generics". I think the "full generic" terminology arose because |
You're right, yeah. It's called a TyKind::Param. I got them confused. I admit, this stuff is confusing! |
It's very likely that I messed it up...
It's not always traits. For example:
Exactly, it's the goal.
Again, it's the goal. :) I'll update to try to clarify all this. |
6b8674a to
8d5ef32
Compare
|
I updated the comments. Please tell me if it still needs improvements. :) |
|
Yeah, that is an improvement. |
|
But it feels like it could be better from your comment haha. What would you improve? |
|
The code in this pull request itself is fine, but some of the code surrounding it (particularly the code handling Type::Generic below it in get_real_types) could use more comments. But that should probably be done in separate PRs. 😄 |
|
@notriddle I opened #90766 for adding more comments. Thanks to both of you for the suggestions! @bors: r=notriddle,camelid rollup |
|
📌 Commit 8d5ef32 has been approved by |
…askrgr Rollup of 5 pull requests Successful merges: - rust-lang#88447 (Use computed visibility in rustdoc) - rust-lang#88868 (Allow simd_bitmask to return byte arrays) - rust-lang#90727 (Remove potential useless data for search index) - rust-lang#90742 (Use AddAssign impl) - rust-lang#90758 (Fix collections entry API documentation.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
I uncovered this case when working on #90726 to debug #90385.
Explanations: if we have a full generic, we check if it has generics then we do the following:
However, I didn't handle the case where a generic had no generics. Meaning that we were adding items with empty names in the search index. So basically useless data in the search index.
r? @camelid