granite-rust/tests
Matthias Krüger 226ce31edd
Rollup merge of #108200 - jhpratt:restricted-damerau-levenshtein-distance, r=tmiasko
Use restricted Damerau-Levenshtein distance for diagnostics

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.

This was first brought up [on IRLO](https://internals.rust-lang.org/t/18227) when it was noticed that the diagnostic for `prinltn!` (transposed L and T) was `print!` and not `println!`. Only a single existing UI test was effected, with the result being an objective improvement.

~~I have left the method name and various other references to the Levenshtein algorithm untouched, as the exact manner in which the edit distance is calculated should not be relevant to the caller.~~

r? ``@estebank``

``@rustbot`` label +A-diagnostics +C-enhancement
2023-02-20 14:32:55 +01:00
..
assembly Update the minimum external LLVM to 14 2023-02-10 16:06:25 -08:00
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
codegen Auto merge of #107921 - cjgillot:codegen-overflow-check, r=tmiasko 2023-02-19 18:17:26 +00:00
codegen-units Move /src/test to /tests 2023-01-11 09:32:08 +00:00
debuginfo Upgrade mingw-w64 on CI 2023-01-29 13:01:06 +01:00
incremental Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mir-opt Replace _with_overflow instrinsics in LowerIntrinsics. 2023-02-18 21:45:10 +00:00
pretty Update tests. 2023-01-29 20:19:26 +01:00
run-make Auto merge of #105601 - BelovDV:change-rlib-with-not-stable, r=petrochenkov 2023-02-12 07:15:27 +00:00
run-make-fulldeps Remove save-analysis. 2023-02-16 15:14:45 +11:00
run-pass-valgrind Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rustdoc Rollup merge of #108129 - GuillaumeGomez:correctly-handle-links-starting-with-whitespace, r=petrochenkov 2023-02-19 14:47:55 +01:00
rustdoc-gui Rollup merge of #107783 - notriddle:notriddle/item-table-ul, r=GuillaumeGomez 2023-02-19 13:03:41 +05:30
rustdoc-js rustdoc: update test cases to match with stricter match criteria 2023-01-21 00:11:39 -07:00
rustdoc-js-std rustdoc: hide reference methods in search index 2023-02-16 17:21:57 -07:00
rustdoc-json Add regression test for #107677 2023-02-18 18:28:17 +01:00
rustdoc-ui Only include stable lints in rustdoc::all group 2023-02-19 22:05:58 -08:00
ui Rollup merge of #108200 - jhpratt:restricted-damerau-levenshtein-distance, r=tmiasko 2023-02-20 14:32:55 +01:00
ui-fulldeps Forbid #[suggestion_*(...)] on Vecs 2023-02-01 21:49:45 +01:00
COMPILER_TESTS.md Move /src/test to /tests 2023-01-11 09:32:08 +00:00