about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-09-27 15:05:18 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-09-27 15:05:18 +0530
commitc34f3eaebc2f805864d3de9c7ce257eb41a6def2 (patch)
tree7dfbfaaf1d34543c3ef066beec3d44e6625769b5
parent30b43c1b124048b54b190a40e0f7e407fc063b1e (diff)
parent92569470512857684f74790db0a21518a6603ca9 (diff)
downloadrust-c34f3eaebc2f805864d3de9c7ce257eb41a6def2.tar.gz
rust-c34f3eaebc2f805864d3de9c7ce257eb41a6def2.zip
Rollup merge of #28688 - Manishearth:fix-primitives-search, r=eddyb
None
-rw-r--r--src/librustdoc/html/static/main.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 5b0b19b95af..9dce1b28c97 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -386,6 +386,9 @@
                 if ((aaa.item.ty === TY_PRIMITIVE) && (bbb.item.ty !== TY_PRIMITIVE)) {
                     return -1;
                 }
+                if ((bbb.item.ty === TY_PRIMITIVE) && (aaa.item.ty !== TY_PRIMITIVE)) {
+                    return 1;
+                }
 
                 // sort by description (no description goes later)
                 a = (aaa.item.desc === '');
@@ -572,6 +575,10 @@
                         displayPath = item.path + '::';
                         href = rootPath + item.path.replace(/::/g, '/') +
                                '/index.html';
+                    } else if (type === "primitive") {
+                        displayPath = "";
+                        href = rootPath + item.path.replace(/::/g, '/') +
+                               '/' + type + '.' + name + '.html';
                     } else if (item.parent !== undefined) {
                         var myparent = item.parent;
                         var anchor = '#' + type + '.' + name;