about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/graph.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-03-12 20:44:50 +0100
committerGitHub <noreply@github.com>2023-03-12 20:44:50 +0100
commitafe257554c30693f545c50fd864b137023deb76a (patch)
tree0aa09d39d215192506cecfb3d19a7f96000f8b5d /compiler/rustc_mir_transform/src/coverage/graph.rs
parentf41796e6b48d15f5680efe413b6322494fecc66d (diff)
parentce795d9ca88bc676aa22efcf2292c475cd1ae39e (diff)
downloadrust-afe257554c30693f545c50fd864b137023deb76a.tar.gz
rust-afe257554c30693f545c50fd864b137023deb76a.zip
Rollup merge of #109009 - notriddle:notriddle/edit-distance, r=GuillaumeGomez
rustdoc: use restricted Damerau-Levenshtein distance for search

Based on https://github.com/rust-lang/rust/pull/108200, for the same rationale.

> This replaces the existing Levenshtein algorithm with the Damerau-Levenshtein algorithm. This means that "ab" to "ba" is one change (a transposition) instead of two (a deletion and insertion). More specifically, this is a restricted implementation, in that "ca" to "abc" cannot be performed as "ca" → "ac" → "abc", as there is an insertion in the middle of a transposition. I believe that errors like that are sufficiently rare that it's not worth taking into account.

Before this change, searching [`prinltn!`] listed `print!` first, followed by `println!`. With this change, `println!` matches more closely.

[`prinltn!`]: https://doc.rust-lang.org/nightly/std/?search=prinltn!
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/graph.rs')
0 files changed, 0 insertions, 0 deletions