rust/src/librustdoc
Michael Howell 59ba74cacb rustdoc: simplify JS search routine by not messing with lev distance
Since the sorting function accounts for an `index` field, there's not much
reason to also be applying changes to the levenshtein distance. Instead,
we can just not treat `lev` as a filter if there's already a non-sentinel
value for `index`.

This change gives slightly more weight to the index and path part, as
search criteria, than it used to. This changes some of the test cases,
but not in any obviously-"worse" way, and, in particular, substring matches
are a bigger deal than levenshtein distances (we're assuming that a typo
is less likely than someone just not typing the entire name).

Based on
https://github.com/rust-lang/rust/pull/103710#issuecomment-1296894296
2023-01-14 12:04:11 -07:00
..
clean Fix rendering 'const' for intrinsics 2023-01-12 03:19:08 +00:00
doctest Rename TestOptions to GlobalTestOptions 2021-12-12 17:46:19 -08:00
formats Remove unneeded ItemId::Primitive variant 2023-01-10 18:30:37 +01:00
html rustdoc: simplify JS search routine by not messing with lev distance 2023-01-14 12:04:11 -07:00
json Remove unneeded ItemId::Primitive variant 2023-01-10 18:30:37 +01:00
passes Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle 2023-01-14 12:04:35 +09:00
theme Correctly handle parens 2022-09-15 13:53:20 +02:00
askama.toml Move back templates into html folder 2022-01-19 11:13:24 +01:00
Cargo.toml update cpufeatures, swap difference to dissimilar 2022-11-29 19:59:37 +03:00
config.rs Revert crate_types change, add new bin_crate field 2022-12-07 09:08:43 -08:00
core.rs Revert crate_types change, add new bin_crate field 2022-12-07 09:08:43 -08:00
docfs.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00
doctest.rs Feed the features_query instead of grabbing it from the session lazily 2023-01-12 17:14:17 +00:00
error.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00
externalfiles.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00
fold.rs clean: Always store enum disriminant. 2023-01-01 18:11:53 +00:00
lib.rs Remove redundant session field 2023-01-13 16:01:27 +00:00
lint.rs Change default lint level of INVALID_HTML_TAGS to warning 2022-10-10 18:28:29 +02:00
markdown.rs rustdoc: remove `type="text/css" from stylesheet links 2022-12-12 15:17:49 -07:00
README.md rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.org 2020-03-10 17:08:18 -03:00
scrape_examples.rs Revert crate_types change, add new bin_crate field 2022-12-07 09:08:43 -08:00
theme.rs Correctly handle parens 2022-09-15 13:53:20 +02:00
visit.rs clean: Always store enum disriminant. 2023-01-01 18:11:53 +00:00
visit_ast.rs fix dupe word typos 2023-01-03 15:48:16 +08:00
visit_lib.rs rustdoc: Split effective visibilities from rustc from similar data built by rustdoc for external def-ids 2022-10-29 23:36:52 +04:00

For more information about how librustdoc works, see the rustc dev guide.