File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed
src/librustdoc/html/static/js Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -5050,9 +5050,11 @@ ${obj.displayPath}<span class="${type}">${name}</span>\
50505050 if ( query . proposeCorrectionFrom !== null && isTypeSearch ) {
50515051 const orig = query . proposeCorrectionFrom ;
50525052 const targ = query . proposeCorrectionTo ;
5053- correctionOutput = "<h3 class=\"search-corrections\">" +
5054- `Type "${ orig } " not found and used as generic parameter. ` +
5055- `Consider searching for "${ targ } " instead.</h3>` ;
5053+ const parts = [ `Type "${ orig } " not found and used as generic parameter.` ] ;
5054+ if ( targ !== null ) {
5055+ parts . push ( `Consider searching for "${ targ } " instead.` ) ;
5056+ }
5057+ correctionOutput = `<h3 class="search-corrections">${ parts . join ( " " ) } </h3>` ;
50565058 }
50575059 if ( firstResult . value ) {
50585060 if ( correctionOutput !== "" ) {
Original file line number Diff line number Diff line change @@ -95,3 +95,24 @@ const EXPECTED = [
9595 ] ,
9696 } ,
9797] ;
98+
99+ const PARSED = [
100+ {
101+ 'query' : 'Result<SomeTraiz>' ,
102+ 'userQuery' : 'Result<SomeTraiz>' ,
103+ 'foundElems' : 1 ,
104+ 'returned' : [ ] ,
105+ 'error' : null ,
106+ 'proposeCorrectionFrom' : 'SomeTraiz' ,
107+ 'proposeCorrectionTo' : 'SomeTrait' ,
108+ } ,
109+ {
110+ 'query' : 'Result<NoSuchTrait>' ,
111+ 'userQuery' : 'Result<NoSuchTrait>' ,
112+ 'foundElems' : 1 ,
113+ 'returned' : [ ] ,
114+ 'error' : null ,
115+ 'proposeCorrectionFrom' : 'NoSuchTrait' ,
116+ 'proposeCorrectionTo' : null ,
117+ } ,
118+ ] ;
You can’t perform that action at this time.
0 commit comments