Skip to content

Fix no results when searching for == in doc#150965

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
chenyukang:yukang-fix-doc-search-150921
Apr 7, 2026
Merged

Fix no results when searching for == in doc#150965
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
chenyukang:yukang-fix-doc-search-150921

Conversation

@chenyukang
Copy link
Copy Markdown
Member

@chenyukang chenyukang commented Jan 11, 2026

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jan 11, 2026

Some changes occurred in GUI tests.

cc @GuillaumeGomez

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @lolbinarycat

@rustbot rustbot added A-rustdoc-search Area: Rustdoc's search feature S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jan 11, 2026
@chenyukang chenyukang force-pushed the yukang-fix-doc-search-150921 branch from ebfadd7 to 176b94a Compare January 11, 2026 12:01
@chenyukang
Copy link
Copy Markdown
Member Author

it's werid to get a failure when run all the doc tests(it's not related to my change, main branch is same with the following result):

./x.py test tests/rustdoc-gui/
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.11s
/Users/yukang/rust/build/aarch64-apple-darwin/ci-llvm/bin/llvm-strip does not exist; skipping copy
Building stage1 compiler artifacts (stage0 -> stage1, aarch64-apple-darwin)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.44s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Building stage1 library artifacts (stage1 -> stage1, aarch64-apple-darwin)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.03s
Building stage1 rustdoc-gui-test (stage0 -> stage1, aarch64-apple-darwin)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.15s
Building stage1 rustdoc_tool_binary (stage0 -> stage1, aarch64-apple-darwin)
   Compiling rustdoc v0.0.0 (/Users/yukang/rust/src/librustdoc)
   Compiling rustdoc-tool v0.0.0 (/Users/yukang/rust/src/tools/rustdoc)
    Finished `release` profile [optimized + debuginfo] target(s) in 2m 08s
Testing stage1 rustdoc-gui (aarch64-apple-darwin)
 Documenting settings v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/settings)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.87s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/settings/index.html
    Checking http v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/lib2/http)
 Documenting http v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/lib2/http)
    Checking implementors v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/lib2/implementors)
 Documenting implementors v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/lib2/implementors)
 Documenting lib2 v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/lib2)
warning: unexpected `cfg` condition value: `foo-method`
  --> lib.rs:29:11
   |
29 | #[doc(cfg(feature = "foo-method"))]
   |           ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `Win32`, `Win32_System`, `Win32_System_Diagnostics`, `Win32_System_Diagnostics_Debug`, and `default`
   = help: consider adding `foo-method` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: `#[warn(unexpected_cfgs)]` on by default

warning: unexpected `cfg` condition value: `foo-method`
  --> lib.rs:48:11
   |
48 | #[doc(cfg(feature = "foo-method"))]
   |           ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `Win32`, `Win32_System`, `Win32_System_Diagnostics`, `Win32_System_Diagnostics_Debug`, and `default`
   = help: consider adding `foo-method` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: `lib2` (lib doc) generated 2 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.31s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/lib2/index.html
 Documenting link_to_definition v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/link_to_definition)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.50s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/link_to_definition/index.html
 Documenting huge_logo v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/huge_logo)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.50s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/huge_logo/index.html
    Checking scrape_ice v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/scrape_examples_ice)
    Scraping scrape_ice v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/scrape_examples_ice)
 Documenting scrape_ice v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/scrape_examples_ice)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.93s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/scrape_ice/index.html
 Documenting macro_expansion v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/macro_expansion)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.42s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/macro_expansion/index.html
    Checking scrape_examples v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/scrape_examples)
    Scraping scrape_examples v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/scrape_examples)
 Documenting scrape_examples v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/scrape_examples)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.23s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/scrape_examples/index.html
 Documenting proc_macro_test v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/proc_macro_test)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/proc_macro_test/index.html
 Documenting staged_api v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/staged_api)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/staged_api/index.html
 Documenting extend_css v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/extend_css)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.43s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/extend_css/index.html
 Documenting theme_css v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/theme_css)
warning: theme file "custom-theme.css" is missing CSS rules from the default theme
  |
  = warning: the theme may appear incorrect when loaded
  = help: to see what rules are missing, call `rustdoc --check-theme "custom-theme.css"`

warning: `theme_css` (lib doc) generated 1 warning
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.52s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/theme_css/index.html
   Compiling test_docs v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/test_docs)
 Documenting test_docs v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/test_docs)
warning: unexpected `cfg` condition value: `appservice-api-c`
   --> lib.rs:562:17
    |
562 |         any(not(feature = "appservice-api-c"), not(feature = "appservice-api-s")),
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `default` and `some-feature`
    = help: consider adding `appservice-api-c` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default

warning: unexpected `cfg` condition value: `appservice-api-s`
   --> lib.rs:562:52
    |
562 |         any(not(feature = "appservice-api-c"), not(feature = "appservice-api-s")),
    |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `default` and `some-feature`
    = help: consider adding `appservice-api-s` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `client`
   --> lib.rs:563:17
    |
563 |         any(not(feature = "client"), not(feature = "server")),
    |                 ^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `default` and `some-feature`
    = help: consider adding `client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `server`
   --> lib.rs:563:42
    |
563 |         any(not(feature = "client"), not(feature = "server")),
    |                                          ^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `default` and `some-feature`
    = help: consider adding `server` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: `test_docs` (lib doc) generated 4 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.02s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html
yarn install v1.22.19
warning package.json: No license field                                                                                                                                                                      
warning ../../../../package.json: License should be a valid SPDX license expression                                                                                                                         
warning No license field                                                                                                                                                                                    
[1/4] Resolving packages...
[2/4] Fetching packages...
warning bare-fs@4.5.0: The engine "bare" appears to be invalid.                                                                                                                                             
warning bare-os@3.6.2: The engine "bare" appears to be invalid.                                                                                                                                             
[3/4] Linking dependencies...
warning Workspaces can only be enabled in private projects.                                                                                                                                                 
[4/4] Building fresh packages...
success Saved lockfile.
Done in 4.40s.
=> Running 146 doc-ui tests (on 10 threads)...

.................................................. (50/146)
.........................F........................ (100/146)
.............................................F     (146/146)

======== tests/rustdoc-gui/notable-trait.goml ========

[ERROR] line 254
    at `tests/rustdoc-gui/utils.goml` line 34: Error: The following CSS properties still don't match: [expected `block` for key `display`, found `none`]: for command `wait-for-css: ("#settings", {"display": "block"})`
    at <file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/struct.NotableStructWithLongName.html#method.create_an_iterator_from_read>

======== tests/rustdoc-gui/search-filter.goml ========

[ERROR] line 21: The following errors happened: [document property `URL` (`file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html?search=test`) doesn't contain `&filter-crate=` (for CONTAINS check)]: for command `assert-document-property: ({"URL": "&filter-crate="}, CONTAINS)`
    at <file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html?search=test>
[ERROR] line 23: assert didn't fail: for command `assert-false: "#results .externcrate"`
    at <file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html?search=test>
[ERROR] line 25: The following errors happened (for selector `#crate-search`): [expected `lib2` for property `"value"`, found `all crates`]: for command `assert-property: ("#crate-search", {"value": "lib2"})`
    at <file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html?search=test>
[ERROR] line 35: assert didn't fail: for command `assert-false: "#results .externcrate"`
    at <file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html?search=test>
[ERROR] line 36: The following errors happened (for selector `#crate-search`): [expected `lib2` for property `"value"`, found `all crates`]: for command `assert-property: ("#crate-search", {"value": "lib2"})`
    at <file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html?search=test>

======== tests/rustdoc-gui/search-result-display.goml ========

[WARNING] line 39: Delta is 0 for "x", maybe try to use `compare-elements-position` instead?


<= doc-ui tests done: 144 succeeded, 2 failed, 0 filtered out

Error: ()
Build completed unsuccessfully in 0:03:57

but it's successful to run only the single test:

warning: `test_docs` (lib doc) generated 4 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.09s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html
yarn install v1.22.19
warning package.json: No license field                                                                                                                                                                      
warning ../../../../package.json: License should be a valid SPDX license expression                                                                                                                         
warning No license field                                                                                                                                                                                    
[1/4] Resolving packages...
[2/4] Fetching packages...
warning bare-fs@4.5.0: The engine "bare" appears to be invalid.                                                                                                                                             
warning bare-os@3.6.2: The engine "bare" appears to be invalid.                                                                                                                                             
[3/4] Linking dependencies...
warning Workspaces can only be enabled in private projects.                                                                                                                                                 
[4/4] Building fresh packages...
success Saved lockfile.
Done in 3.74s.
[WARNING] No failure or image folder set, taking first test file's folder
=> Running 1 doc-ui test (on 10 threads)...

.                                                  (1/1)

======== tests/rustdoc-gui/search-result-display.goml ========

[WARNING] line 39: Delta is 0 for "x", maybe try to use `compare-elements-position` instead?


<= doc-ui tests done: 1 succeeded, 0 failed, 0 filtered out

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 11, 2026
@notriddle
Copy link
Copy Markdown
Contributor

@chenyukang

it's werid to get a failure when run all the doc tests

Yeah, I get the same thing. The browser ui tests pass on Linux and fail on macOS. Font differences, I think.

@GuillaumeGomez
Copy link
Copy Markdown
Member

Just tested locally and it doesn't fix the problem with core. You can generate core docs as follows if you want to test locally: x.py doc core --stage 1 --open.

@rustbot rustbot added the A-rustdoc-js Area: Rustdoc's JS front-end label Jan 18, 2026
@notriddle
Copy link
Copy Markdown
Contributor

93963b1 seems unrelated to this PR?

@chenyukang
Copy link
Copy Markdown
Member Author

93963b1 seems unrelated to this PR?

yeah, I created branch based on wrong branch. I will fix it.

@chenyukang chenyukang force-pushed the yukang-fix-doc-search-150921 branch from 93963b1 to a87ff43 Compare January 18, 2026 04:36
@chenyukang
Copy link
Copy Markdown
Member Author

Just tested locally and it doesn't fix the problem with core. You can generate core docs as follows if you want to test locally: x.py doc core --stage 1 --open.

emm, I also reproduced it not working on core, werid.

@chenyukang chenyukang force-pushed the yukang-fix-doc-search-150921 branch from a87ff43 to f066bd5 Compare April 7, 2026 05:57
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 7, 2026

This PR was rebased onto a different main 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.

@chenyukang
Copy link
Copy Markdown
Member Author

Just tested locally and it doesn't fix the problem with core. You can generate core docs as follows if you want to test locally: x.py doc core --stage 1 --open.

I updated the code, now the new change fix it.

@chenyukang chenyukang force-pushed the yukang-fix-doc-search-150921 branch from f066bd5 to 03b453c Compare April 7, 2026 11:33
@notriddle
Copy link
Copy Markdown
Contributor

@bors r=notriddle,GuillaumeGomez

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 7, 2026

📌 Commit 03b453c has been approved by notriddle,GuillaumeGomez

It is now in the queue for this repository.

@rust-bors rust-bors bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 7, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 7, 2026
…50921, r=notriddle,GuillaumeGomez

Fix no results when searching for == in doc

Fixes rust-lang#150921

r? @GuillaumeGomez
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 7, 2026
…50921, r=notriddle,GuillaumeGomez

Fix no results when searching for == in doc

Fixes rust-lang#150921

r? @GuillaumeGomez
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 7, 2026
…50921, r=notriddle,GuillaumeGomez

Fix no results when searching for == in doc

Fixes rust-lang#150921

r? @GuillaumeGomez
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 7, 2026
…50921, r=notriddle,GuillaumeGomez

Fix no results when searching for == in doc

Fixes rust-lang#150921

r? @GuillaumeGomez
rust-bors bot pushed a commit that referenced this pull request Apr 7, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #150965 (Fix no results when searching for == in doc)
 - #153999 (Remove `TaggedQueryKey::def_kind`)
 - #154146 (Split out the creation of `Cycle` to a new `process_cycle` function)
 - #154147 (Do not attempt generating DllImport for extern types)
 - #154812 (Update Fira Mono License Information)
 - #154880 (bootstrap: minor improvements to download-rustc)
 - #154886 (Stabilize check-cfg suggestions for symbol)
 - #154889 (Update wasm-component-ld to 0.5.22)
 - #154928 (Fix pin docs)
 - #154942 (delegation: generate more verbose error delegation)
 - #153269 (GCI: During reachability analysis don't try to evaluate the initializer of overly generic free const items)
 - #154506 (Migrate some tests from `tests/ui/issues` to appropriate directories)
 - #154673 (Use a different name for fast try builds)
 - #154761 (coretests: add argument order regression tests for min_by/max_by/minmax_by)
 - #154795 (Add more info about where autodiff can be applied)
 - #154808 (Post-attribute ports cleanup pt. 1)
 - #154825 (constify `Step for NonZero<u*>`)
 - #154837 (library: std: motor: use OS' process::exit in abort_internal)
 - #154866 (add regression test for #146514)
 - #154922 (c-b: Export inverse hyperbolic trigonometric functions)
 - #154931 (delegation(small cleanup): remove not needed PhantomData)
 - #154950 (library: no `cfg(target_arch)` on scalable intrinsics)
@rust-bors rust-bors bot merged commit a5ff88b into rust-lang:main Apr 7, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Apr 7, 2026
rust-timer added a commit that referenced this pull request Apr 7, 2026
Rollup merge of #150965 - chenyukang:yukang-fix-doc-search-150921, r=notriddle,GuillaumeGomez

Fix no results when searching for == in doc

Fixes #150921

r? @GuillaumeGomez
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Apr 8, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - rust-lang/rust#150965 (Fix no results when searching for == in doc)
 - rust-lang/rust#153999 (Remove `TaggedQueryKey::def_kind`)
 - rust-lang/rust#154146 (Split out the creation of `Cycle` to a new `process_cycle` function)
 - rust-lang/rust#154147 (Do not attempt generating DllImport for extern types)
 - rust-lang/rust#154812 (Update Fira Mono License Information)
 - rust-lang/rust#154880 (bootstrap: minor improvements to download-rustc)
 - rust-lang/rust#154886 (Stabilize check-cfg suggestions for symbol)
 - rust-lang/rust#154889 (Update wasm-component-ld to 0.5.22)
 - rust-lang/rust#154928 (Fix pin docs)
 - rust-lang/rust#154942 (delegation: generate more verbose error delegation)
 - rust-lang/rust#153269 (GCI: During reachability analysis don't try to evaluate the initializer of overly generic free const items)
 - rust-lang/rust#154506 (Migrate some tests from `tests/ui/issues` to appropriate directories)
 - rust-lang/rust#154673 (Use a different name for fast try builds)
 - rust-lang/rust#154761 (coretests: add argument order regression tests for min_by/max_by/minmax_by)
 - rust-lang/rust#154795 (Add more info about where autodiff can be applied)
 - rust-lang/rust#154808 (Post-attribute ports cleanup pt. 1)
 - rust-lang/rust#154825 (constify `Step for NonZero<u*>`)
 - rust-lang/rust#154837 (library: std: motor: use OS' process::exit in abort_internal)
 - rust-lang/rust#154866 (add regression test for rust-lang/rust#146514)
 - rust-lang/rust#154922 (c-b: Export inverse hyperbolic trigonometric functions)
 - rust-lang/rust#154931 (delegation(small cleanup): remove not needed PhantomData)
 - rust-lang/rust#154950 (library: no `cfg(target_arch)` on scalable intrinsics)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-search Area: Rustdoc's search feature 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No results when searching for == in the standard library

4 participants