From db277f528407864e24d3d7934d9c23e28d950165 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Mon, 12 Jun 2023 14:56:54 -0700 Subject: rustdoc-search: search never type with `!` This feature extends rustdoc to support the syntax that most users will naturally attempt to use to search for diverging functions. Part of #60485 It's already possible to do this search with `primitive:never`, but that's not what the Rust language itself uses, so nobody will try it if they aren't told or helped along. --- tests/rustdoc-js-std/parser-errors.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/rustdoc-js-std/parser-errors.js') diff --git a/tests/rustdoc-js-std/parser-errors.js b/tests/rustdoc-js-std/parser-errors.js index aa8ee86d672..af7f63f99cb 100644 --- a/tests/rustdoc-js-std/parser-errors.js +++ b/tests/rustdoc-js-std/parser-errors.js @@ -359,6 +359,15 @@ const PARSED = [ userQuery: "mod:a!", error: 'Invalid search type: macro `!` and `mod` both specified', }, + { + query: "mod:!", + elems: [], + foundElems: 0, + original: "mod:!", + returned: [], + userQuery: "mod:!", + error: 'Invalid search type: primitive never type `!` and `mod` both specified', + }, { query: "a!::a", elems: [], -- cgit 1.4.1-3-g733a5