Skip to content

Rollup of 10 pull requests #129497

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

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b335ec9
Add a special case for CStr/CString in the improper_ctypes lint
Flying-Toast Mar 23, 2024
f6767f7
Detect `*` operator on `!Sized` expression
estebank Jul 31, 2024
f62b9e0
rustc: Simplify getting sysroot library directory
petrochenkov Jul 30, 2024
5e6c87d
Port std library to RTEMS
thesummer Aug 21, 2023
d28690d
rtems: Add spec file for arm_rtems6_eabihf
thesummer Jan 23, 2024
f83ddb5
Add documentation for target armv7-rtems-eabihf
thesummer Jun 26, 2024
4c5e888
rustdoc: show exact case-sensitive matches first
lolbinarycat Aug 22, 2024
b968b26
Put Pin::as_deref_mut in impl Pin<Ptr>
coolreader18 Aug 22, 2024
c65ef3d
Move into_inner_unchecked back to the bottom of the impl block
coolreader18 Aug 23, 2024
62f7d53
Update `compiler_builtins` to `0.1.121`
scottmcm Aug 23, 2024
5c6285c
Add myself to the review rotation for libs
thomcc Aug 23, 2024
5cef88c
Print the generic parameter along with the variance in dumps.
cjgillot Aug 22, 2024
9ccd7ab
library: Move unstable API of new_uninit to new features
workingjubilee Aug 22, 2024
90b4e17
CI: rfl: move to temporary commit
ojeda Aug 23, 2024
3415198
Rollup merge of #127021 - thesummer:1-add-target-support-for-rtems-ar…
workingjubilee Aug 24, 2024
1a70ad1
Rollup merge of #128467 - estebank:unsized-args, r=cjgillot
workingjubilee Aug 24, 2024
8423a2a
Rollup merge of #128735 - jieyouxu:pr-120176-revive, r=cjgillot
workingjubilee Aug 24, 2024
94d0725
Rollup merge of #129416 - workingjubilee:partial-move-from-stabilizat…
workingjubilee Aug 24, 2024
eb8d76c
Rollup merge of #129418 - petrochenkov:libsearch2, r=jieyouxu
workingjubilee Aug 24, 2024
15a7043
Rollup merge of #129429 - cjgillot:named-variance, r=compiler-errors
workingjubilee Aug 24, 2024
25a3c88
Rollup merge of #129430 - lolbinarycat:rustdoc-search-exact-case, r=n…
workingjubilee Aug 24, 2024
81707e5
Rollup merge of #129449 - coolreader18:pin-as_deref_mut-signature, r=…
workingjubilee Aug 24, 2024
3442ec7
Rollup merge of #129481 - scottmcm:update-cb, r=tgross35
workingjubilee Aug 24, 2024
d482191
Rollup merge of #129482 - thomcc:add-to-review-rotation, r=jieyouxu
workingjubilee Aug 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/librustdoc/html/static/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,7 @@ function initSearch(rawSearchIndex) {
*/
async function sortResults(results, isType, preferredCrate) {
const userQuery = parsedQuery.userQuery;
const casedUserQuery = parsedQuery.original;
const result_list = [];
for (const result of results.values()) {
result.item = searchIndex[result.id];
Expand All @@ -1403,6 +1404,13 @@ function initSearch(rawSearchIndex) {
result_list.sort((aaa, bbb) => {
let a, b;

// sort by exact case-sensitive match
a = (aaa.item.name !== casedUserQuery);
b = (bbb.item.name !== casedUserQuery);
if (a !== b) {
return a - b;
}

// sort by exact match with regard to the last word (mismatch goes later)
a = (aaa.word !== userQuery);
b = (bbb.word !== userQuery);
Expand Down
7 changes: 7 additions & 0 deletions tests/rustdoc-js-std/exact-case.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const EXPECTED = {
'query': 'Copy',
'others': [
{ 'path': 'std::marker', 'name': 'Copy' },
{ 'path': 'std::fs', 'name': 'copy' },
],
}