Commit 2a391e9
authored
Rollup merge of rust-lang#149332 - asukaminato0721:149324, r=GuillaumeGomez
fix rustdoc search says “Consider searching for "null" instead.” rust-lang#149324
fix rust-lang#149324
Now builds the “generic parameter” correction banner from discrete sentence fragments and appends the “Consider searching …” clause only when query.proposeCorrectionTo is non-null, so the UI no longer renders null as the suggested type.
Adds a PARSED section with two queries: one typo (Result<SomeTraiz>) that still produces a concrete suggestion and one fully unknown type (Result<NoSuchTrait>) that leaves proposeCorrectionTo null.File tree
2 files changed
+26
-3
lines changed- src/librustdoc/html/static/js
- tests/rustdoc-js
2 files changed
+26
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5050 | 5050 | | |
5051 | 5051 | | |
5052 | 5052 | | |
5053 | | - | |
5054 | | - | |
5055 | | - | |
| 5053 | + | |
| 5054 | + | |
| 5055 | + | |
| 5056 | + | |
| 5057 | + | |
5056 | 5058 | | |
5057 | 5059 | | |
5058 | 5060 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
0 commit comments