[rustdoc search] Simplify itemTypes and filter "dependencies"#148440
Merged
bors merged 1 commit intorust-lang:masterfrom Nov 6, 2025
Merged
[rustdoc search] Simplify itemTypes and filter "dependencies"#148440bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
Some changes occurred in HTML/CSS/JS. |
notriddle
reviewed
Nov 5, 2025
| } | ||
| const index = itemTypes.findIndex(i => i === typename); | ||
| if (index < 0) { | ||
| // @ts-ignore |
Contributor
There was a problem hiding this comment.
Suggested change
| // @ts-ignore | |
| // @ts-expected-error |
It would also be nice if you said why the type error is ignored whenever you introduce a new one.
Contributor
There was a problem hiding this comment.
I think you made a typo: It's ts-expect-error
Member
Author
There was a problem hiding this comment.
Oh right, the tsc error is:
src/librustdoc/html/static/js/search.js:1209:19 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Readonly<{ keyword: 0; primitive: 1; mod: 2; externcrate: 3; import: 4; struct: 5; enum: 6; fn: 7; type: 8; static: 9; trait: 10; impl: 11; tymethod: 12; method: 13; structfield: 14; variant: 15; macro: 16; associatedtype: 17; ... 9 more ...; attribute: 27; }>'.
No index signature with a parameter of type 'string' was found on type 'Readonly<{ keyword: 0; primitive: 1; mod: 2; externcrate: 3; import: 4; struct: 5; enum: 6; fn: 7; type: 8; static: 9; trait: 10; impl: 11; tymethod: 12; method: 13; structfield: 14; variant: 15; macro: 16; associatedtype: 17; ... 9 more ...; attribute: 27; }>'.
notriddle
reviewed
Nov 5, 2025
|
|
||
| // No match | ||
| return false; | ||
| // @ts-ignore |
Contributor
There was a problem hiding this comment.
Suggested change
| // @ts-ignore | |
| // @ts-expected-error |
Contributor
|
r=me after fixing those two problems |
c11d24b to
72d94d1
Compare
Collaborator
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Member
Author
|
@bors r=notriddle rollup |
Collaborator
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Nov 5, 2025
…, r=notriddle [rustdoc search] Simplify itemTypes and filter "dependencies" We currently have a list of type filters, some constants to be able to index the list of type filters and finally a `switch` to include some types in a given filter (for example when we filter on `constant`, we also include `associatedconstant` items). r? `@notriddle`
This was referenced Nov 5, 2025
bors
added a commit
that referenced
this pull request
Nov 5, 2025
Rollup of 8 pull requests Successful merges: - #147994 (Deduplicate deprecation warning when using unit or tuple structs) - #148440 ([rustdoc search] Simplify itemTypes and filter "dependencies") - #148501 (triagebot: Create Zulip topics for libs backports) - #148517 (Remove no longer necessary lint allow) - #148518 (Unify the configuration of the compiler docs) - #148523 (miri subtree update) - #148525 (Fix ICE from lit_to_mir_constant caused by type error) - #148534 (Merge `Vec::push{,_mut}_within_capacity`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Nov 6, 2025
Rollup merge of #148440 - GuillaumeGomez:improve-search-code, r=notriddle [rustdoc search] Simplify itemTypes and filter "dependencies" We currently have a list of type filters, some constants to be able to index the list of type filters and finally a `switch` to include some types in a given filter (for example when we filter on `constant`, we also include `associatedconstant` items). r? ``@notriddle``
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Nov 6, 2025
Rollup of 8 pull requests Successful merges: - rust-lang/rust#147994 (Deduplicate deprecation warning when using unit or tuple structs) - rust-lang/rust#148440 ([rustdoc search] Simplify itemTypes and filter "dependencies") - rust-lang/rust#148501 (triagebot: Create Zulip topics for libs backports) - rust-lang/rust#148517 (Remove no longer necessary lint allow) - rust-lang/rust#148518 (Unify the configuration of the compiler docs) - rust-lang/rust#148523 (miri subtree update) - rust-lang/rust#148525 (Fix ICE from lit_to_mir_constant caused by type error) - rust-lang/rust#148534 (Merge `Vec::push{,_mut}_within_capacity`) r? `@ghost` `@rustbot` modify labels: rollup
makai410
pushed a commit
to makai410/rustc_public
that referenced
this pull request
Nov 7, 2025
Rollup of 8 pull requests Successful merges: - rust-lang/rust#147994 (Deduplicate deprecation warning when using unit or tuple structs) - rust-lang/rust#148440 ([rustdoc search] Simplify itemTypes and filter "dependencies") - rust-lang/rust#148501 (triagebot: Create Zulip topics for libs backports) - rust-lang/rust#148517 (Remove no longer necessary lint allow) - rust-lang/rust#148518 (Unify the configuration of the compiler docs) - rust-lang/rust#148523 (miri subtree update) - rust-lang/rust#148525 (Fix ICE from lit_to_mir_constant caused by type error) - rust-lang/rust#148534 (Merge `Vec::push{,_mut}_within_capacity`) r? `@ghost` `@rustbot` modify labels: rollup
makai410
pushed a commit
to makai410/rust
that referenced
this pull request
Nov 8, 2025
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#147994 (Deduplicate deprecation warning when using unit or tuple structs) - rust-lang#148440 ([rustdoc search] Simplify itemTypes and filter "dependencies") - rust-lang#148501 (triagebot: Create Zulip topics for libs backports) - rust-lang#148517 (Remove no longer necessary lint allow) - rust-lang#148518 (Unify the configuration of the compiler docs) - rust-lang#148523 (miri subtree update) - rust-lang#148525 (Fix ICE from lit_to_mir_constant caused by type error) - rust-lang#148534 (Merge `Vec::push{,_mut}_within_capacity`) r? `@ghost` `@rustbot` modify labels: rollup
makai410
pushed a commit
to makai410/rust
that referenced
this pull request
Nov 10, 2025
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#147994 (Deduplicate deprecation warning when using unit or tuple structs) - rust-lang#148440 ([rustdoc search] Simplify itemTypes and filter "dependencies") - rust-lang#148501 (triagebot: Create Zulip topics for libs backports) - rust-lang#148517 (Remove no longer necessary lint allow) - rust-lang#148518 (Unify the configuration of the compiler docs) - rust-lang#148523 (miri subtree update) - rust-lang#148525 (Fix ICE from lit_to_mir_constant caused by type error) - rust-lang#148534 (Merge `Vec::push{,_mut}_within_capacity`) r? `@ghost` `@rustbot` modify labels: rollup
antoyo
pushed a commit
to rust-lang/rustc_codegen_gcc
that referenced
this pull request
Nov 13, 2025
Rollup of 8 pull requests Successful merges: - rust-lang/rust#147994 (Deduplicate deprecation warning when using unit or tuple structs) - rust-lang/rust#148440 ([rustdoc search] Simplify itemTypes and filter "dependencies") - rust-lang/rust#148501 (triagebot: Create Zulip topics for libs backports) - rust-lang/rust#148517 (Remove no longer necessary lint allow) - rust-lang/rust#148518 (Unify the configuration of the compiler docs) - rust-lang/rust#148523 (miri subtree update) - rust-lang/rust#148525 (Fix ICE from lit_to_mir_constant caused by type error) - rust-lang/rust#148534 (Merge `Vec::push{,_mut}_within_capacity`) r? `@ghost` `@rustbot` modify labels: rollup
makai410
pushed a commit
to makai410/rustc_public
that referenced
this pull request
Nov 16, 2025
Rollup of 8 pull requests Successful merges: - rust-lang/rust#147994 (Deduplicate deprecation warning when using unit or tuple structs) - rust-lang/rust#148440 ([rustdoc search] Simplify itemTypes and filter "dependencies") - rust-lang/rust#148501 (triagebot: Create Zulip topics for libs backports) - rust-lang/rust#148517 (Remove no longer necessary lint allow) - rust-lang/rust#148518 (Unify the configuration of the compiler docs) - rust-lang/rust#148523 (miri subtree update) - rust-lang/rust#148525 (Fix ICE from lit_to_mir_constant caused by type error) - rust-lang/rust#148534 (Merge `Vec::push{,_mut}_within_capacity`) r? `@ghost` `@rustbot` modify labels: rollup
Kobzol
pushed a commit
to Kobzol/rustc_codegen_gcc
that referenced
this pull request
Dec 21, 2025
Rollup of 8 pull requests Successful merges: - rust-lang/rust#147994 (Deduplicate deprecation warning when using unit or tuple structs) - rust-lang/rust#148440 ([rustdoc search] Simplify itemTypes and filter "dependencies") - rust-lang/rust#148501 (triagebot: Create Zulip topics for libs backports) - rust-lang/rust#148517 (Remove no longer necessary lint allow) - rust-lang/rust#148518 (Unify the configuration of the compiler docs) - rust-lang/rust#148523 (miri subtree update) - rust-lang/rust#148525 (Fix ICE from lit_to_mir_constant caused by type error) - rust-lang/rust#148534 (Merge `Vec::push{,_mut}_within_capacity`) r? `@ghost` `@rustbot` modify labels: rollup
Kobzol
pushed a commit
to Kobzol/rustc_codegen_cranelift
that referenced
this pull request
Dec 29, 2025
Rollup of 8 pull requests Successful merges: - rust-lang/rust#147994 (Deduplicate deprecation warning when using unit or tuple structs) - rust-lang/rust#148440 ([rustdoc search] Simplify itemTypes and filter "dependencies") - rust-lang/rust#148501 (triagebot: Create Zulip topics for libs backports) - rust-lang/rust#148517 (Remove no longer necessary lint allow) - rust-lang/rust#148518 (Unify the configuration of the compiler docs) - rust-lang/rust#148523 (miri subtree update) - rust-lang/rust#148525 (Fix ICE from lit_to_mir_constant caused by type error) - rust-lang/rust#148534 (Merge `Vec::push{,_mut}_within_capacity`) r? `@ghost` `@rustbot` modify labels: rollup
christian-schilling
pushed a commit
to christian-schilling/rustc_codegen_cranelift
that referenced
this pull request
Jan 27, 2026
Rollup of 8 pull requests Successful merges: - rust-lang/rust#147994 (Deduplicate deprecation warning when using unit or tuple structs) - rust-lang/rust#148440 ([rustdoc search] Simplify itemTypes and filter "dependencies") - rust-lang/rust#148501 (triagebot: Create Zulip topics for libs backports) - rust-lang/rust#148517 (Remove no longer necessary lint allow) - rust-lang/rust#148518 (Unify the configuration of the compiler docs) - rust-lang/rust#148523 (miri subtree update) - rust-lang/rust#148525 (Fix ICE from lit_to_mir_constant caused by type error) - rust-lang/rust#148534 (Merge `Vec::push{,_mut}_within_capacity`) r? `@ghost` `@rustbot` modify labels: rollup
christian-schilling
pushed a commit
to christian-schilling/rustc_codegen_cranelift
that referenced
this pull request
Jan 27, 2026
Rollup of 8 pull requests Successful merges: - rust-lang/rust#147994 (Deduplicate deprecation warning when using unit or tuple structs) - rust-lang/rust#148440 ([rustdoc search] Simplify itemTypes and filter "dependencies") - rust-lang/rust#148501 (triagebot: Create Zulip topics for libs backports) - rust-lang/rust#148517 (Remove no longer necessary lint allow) - rust-lang/rust#148518 (Unify the configuration of the compiler docs) - rust-lang/rust#148523 (miri subtree update) - rust-lang/rust#148525 (Fix ICE from lit_to_mir_constant caused by type error) - rust-lang/rust#148534 (Merge `Vec::push{,_mut}_within_capacity`) r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We currently have a list of type filters, some constants to be able to index the list of type filters and finally a
switchto include some types in a given filter (for example when we filter onconstant, we also includeassociatedconstantitems).r? @notriddle