Skip to content

rustdoc search: rank aliases lower than exact matches #142653

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lolbinarycat
Copy link
Contributor

@lolbinarycat lolbinarycat commented Jun 17, 2025

will fix #140968

@rustbot rustbot added A-rustdoc-search Area: Rustdoc's search feature 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 Jun 17, 2025
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [rustdoc-js] tests/rustdoc-js/doc-alias.rs stdout ----

error: rustdoc-js test failed!
status: exit status: 1
command: "/usr/bin/node" "/checkout/src/tools/rustdoc-js/tester.js" "--doc-folder" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/rustdoc-js/doc-alias" "--crate-name" "doc_alias" "--test-file" "/checkout/tests/rustdoc-js/doc-alias.js"
--- stdout -------------------------------
Testing /checkout/tests/rustdoc-js/doc-alias.js ... FAILED
[ query `UnionItem`]==> '{"path":"doc_alias::Union","name":"union_item","desc":"Doc for <code>Union::union_item</code>","href":"../doc_alias/union.Union.html#structfield.union_item"}' was supposed to be before '{"crate":"doc_alias","name":"Union","path":"doc_alias","descShard":{"crate":"doc_alias","shard":0,"start":0,"len":27,"promise":{}},"descIndex":11,"exactPath":"doc_alias","ty":20,"type":null,"is_alias":true,"bitIndex":12,"implDisambiguator":null,"desc":"Doc for <code>Union</code>","alias":"UnionItem","displayPath":"<span>doc_alias::</span>","fullPath":"<span>doc_alias::</span>Union","href":"../doc_alias/union.Union.html"}'
------------------------------------------
stderr: none


---- [rustdoc-js] tests/rustdoc-js/non-english-identifier.rs stdout ----

error: rustdoc-js test failed!
status: exit status: 1
command: "/usr/bin/node" "/checkout/src/tools/rustdoc-js/tester.js" "--doc-folder" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/rustdoc-js/non-english-identifier" "--crate-name" "non_english_identifier" "--test-file" "/checkout/tests/rustdoc-js/non-english-identifier.js"
--- stdout -------------------------------
Testing /checkout/tests/rustdoc-js/non-english-identifier.js ... FAILED
[ query `加法`]==> '{"name":"加法","path":"non_english_identifier","href":"../non_english_identifier/trait.加法.html","desc":"Add"}' was supposed to be before '{"crate":"non_english_identifier","name":"add","path":"non_english_identifier","descShard":{"crate":"non_english_identifier","shard":0,"start":0,"len":5,"promise":{}},"descIndex":2,"exactPath":"non_english_identifier","ty":7,"type":{"inputs":[{"id":12,"name":"usize","ty":1,"path":"non_english_identifier","exactPath":"non_english_identifier","generics":[],"bindings":{},"unboxFlag":false},{"id":12,"name":"usize","ty":1,"path":"non_english_identifier","exactPath":"non_english_identifier","generics":[],"bindings":{},"unboxFlag":false}],"output":[{"id":12,"name":"usize","ty":1,"path":"non_english_identifier","exactPath":"non_english_identifier","generics":[],"bindings":{},"unboxFlag":false}],"where_clause":[]},"is_alias":true,"bitIndex":3,"implDisambiguator":null,"desc":"","alias":"加法","displayPath":"<span>non_english_identifier::</span>","fullPath":"<span>non_english_identifier::</span>add","href":"../non_english_identifier/fn.add.html"}'
OK
------------------------------------------
stderr: none


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-search Area: Rustdoc's search feature 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.

rustdoc search: if all else is equal, rank alias results lower
3 participants