File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/librustdoc/html/static/js Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -4919,11 +4919,12 @@ ${item.displayPath}<span class="${type}">${name}</span>\
49194919 } ) ;
49204920 } else if ( query . error === null ) {
49214921 const dlroChannel = `https://doc.rust-lang.org/${ getVar ( "channel" ) } ` ;
4922+ const docsrsURL = `https://docs.rs/releases/search?query=${ encodeURIComponent ( query . userQuery ) } ` ;
4923+ const duckduckgoURL = `https://duckduckgo.com/?q=${ encodeURIComponent ( "rust " + query . userQuery ) } ` ;
49224924 output . className = "search-failed" + extraClass ;
4923- output . innerHTML = "No results :(<br/>" +
4924- "Try on <a href=\"https://duckduckgo.com/?q=" +
4925- encodeURIComponent ( "rust " + query . userQuery ) +
4926- "\">DuckDuckGo</a>?<br/><br/>" +
4925+ output . innerHTML = `No results in <code>${ getVar ( "crate" ) } </code> :(<br/>` +
4926+ `Search for <a href="${ docsrsURL } ">other crates</a>?<br/>` +
4927+ `Or try on <a href="${ duckduckgoURL } ">DuckDuckGo</a>?<br/><br/>` +
49274928 "Or try looking in one of these:<ul><li>The <a " +
49284929 `href="${ dlroChannel } /reference/index.html">Rust Reference</a> ` +
49294930 " for technical details about the language.</li><li><a " +
You can’t perform that action at this time.
0 commit comments