"));
@@ -1735,7 +1718,7 @@ impl<'a> fmt::Show for Sidebar<'a> {
fn build_sidebar(m: &clean::Module) -> HashMap<~str, Vec<~str> > {
let mut map = HashMap::new();
for item in m.items.iter() {
- let short = shortty(item);
+ let short = shortty(item).to_static_str();
let myname = match item.name {
None => continue,
Some(ref s) => s.to_owned(),
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 1904ab27d17..43fb02f62be 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -135,7 +135,7 @@
function execQuery(query, max, searchWords) {
var valLower = query.query.toLowerCase(),
val = valLower,
- typeFilter = query.type,
+ typeFilter = itemTypeFromName(query.type),
results = [],
split = valLower.split("::");
@@ -156,7 +156,7 @@
for (var i = 0; i < nSearchWords; i += 1) {
if (searchWords[i] === val) {
// filter type: ... queries
- if (!typeFilter || typeFilter === searchIndex[i].ty) {
+ if (typeFilter < 0 || typeFilter === searchIndex[i].ty) {
results.push({id: i, index: -1});
}
}
@@ -174,7 +174,7 @@
searchWords[j].replace(/_/g, "").indexOf(val) > -1)
{
// filter type: ... queries
- if (!typeFilter || typeFilter === searchIndex[j].ty) {
+ if (typeFilter < 0 || typeFilter === searchIndex[j].ty) {
results.push({id: j, index: searchWords[j].replace(/_/g, "").indexOf(val)});
}
}
@@ -405,7 +405,7 @@
shown.push(item);
name = item.name;
- type = item.ty;
+ type = itemTypes[item.ty];
output += '