removing 'str'='struct' search synonym

fixes #16384
This commit is contained in:
Alexis Beingessner 2014-08-09 09:20:44 -04:00
parent ca89cfb0e3
commit 0f5ce0f0df
2 changed files with 2 additions and 3 deletions

View File

@ -106,7 +106,7 @@ pub fn render<T: fmt::Show, S: fmt::Show>(
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code> (or <code>str</code>), <code>enum</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>typedef</code> (or
<code>tdef</code>).
</p>

View File

@ -370,10 +370,9 @@
function getQuery() {
var matches, type, query = $('.search-input').val();
matches = query.match(/^(fn|mod|str(uct)?|enum|trait|t(ype)?d(ef)?)\s*:\s*/i);
matches = query.match(/^(fn|mod|struct|enum|trait|t(ype)?d(ef)?)\s*:\s*/i);
if (matches) {
type = matches[1].replace(/^td$/, 'typedef')
.replace(/^str$/, 'struct')
.replace(/^tdef$/, 'typedef')
.replace(/^typed$/, 'typedef');
query = query.substring(matches[0].length);