rustdoc: compute maximum Levenshtein distance based on the query

The heuristic is pretty close to the name resolver.

Fixes #103357
This commit is contained in:
Michael Howell 2022-10-28 21:54:09 -07:00
parent 5ce39f42bd
commit e09e6df787
3 changed files with 84 additions and 70 deletions

View file

@ -1,5 +1,3 @@
// exact-check
const QUERY = [
'StructItem',
'StructFieldItem',