mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-22 03:44:24 +00:00
rustdoc-search: use more descriptive "x not found; y instead" message
This commit is contained in:
parent
7529d87407
commit
395840cd5e
@ -2000,7 +2000,7 @@ function initSearch(rawSearchIndex) {
|
||||
: results.query.elems[0].name;
|
||||
output += "<h3 class=\"search-corrections\">" +
|
||||
`Type "${orig}" not found. ` +
|
||||
"Showing results for " +
|
||||
"Showing results for closest type name " +
|
||||
`"${results.query.correction}" instead.</h3>`;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
// Checks that the search tab result tell the user about corrections
|
||||
// First, try a search-by-name
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
@ -22,7 +24,7 @@ assert-css: (".search-corrections", {
|
||||
})
|
||||
assert-text: (
|
||||
".search-corrections",
|
||||
"Type \"notablestructwithlongnamr\" not found. Showing results for \"notablestructwithlongname\" instead."
|
||||
"Type \"notablestructwithlongnamr\" not found. Showing results for closest type name \"notablestructwithlongname\" instead."
|
||||
)
|
||||
|
||||
// Corrections do get shown on the "In Return Type" tab.
|
||||
@ -33,7 +35,7 @@ assert-css: (".search-corrections", {
|
||||
})
|
||||
assert-text: (
|
||||
".search-corrections",
|
||||
"Type \"notablestructwithlongnamr\" not found. Showing results for \"notablestructwithlongname\" instead."
|
||||
"Type \"notablestructwithlongnamr\" not found. Showing results for closest type name \"notablestructwithlongname\" instead."
|
||||
)
|
||||
|
||||
// Now, explicit return values
|
||||
@ -50,5 +52,5 @@ assert-css: (".search-corrections", {
|
||||
})
|
||||
assert-text: (
|
||||
".search-corrections",
|
||||
"Type \"notablestructwithlongnamr\" not found. Showing results for \"notablestructwithlongname\" instead."
|
||||
"Type \"notablestructwithlongnamr\" not found. Showing results for closest type name \"notablestructwithlongname\" instead."
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user