From b71426dd949836796c29261c625c11cd383d741d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 6 Oct 2026 12:38:42 +0200 Subject: [PATCH] Add regression test for duplicated rustdoc search results between std and core --- tests/rustdoc-js-std/core-std-duplicates.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/rustdoc-js-std/core-std-duplicates.js diff --git a/tests/rustdoc-js-std/core-std-duplicates.js b/tests/rustdoc-js-std/core-std-duplicates.js new file mode 100644 index 0000000000000..4647ec6408746 --- /dev/null +++ b/tests/rustdoc-js-std/core-std-duplicates.js @@ -0,0 +1,21 @@ +// This test ensures that search results are not duplicated between `std` and `core`. +// Regression test for . + +// exact-check + +const EXPECTED = [ + { + 'query': 'primitive:char', + 'others': [ + { 'path': 'std', 'name': 'char' }, + ], + }, + { + 'query': 'char->u32', + 'others': [ + { 'path': 'std::u32', 'name': 'from' }, + { 'path': 'std::char', 'name': 'to_u32' }, + { 'path': 'std::char', 'name': 'to_digit' }, + ], + }, +];