]> git.lizzy.rs Git - rust.git/commitdiff
Fix search fn keyword
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 15 Jun 2018 21:23:25 +0000 (23:23 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 15 Jun 2018 21:23:25 +0000 (23:23 +0200)
src/librustdoc/html/static/main.js

index ed6745cd7f52529ee086e983af85a91b520bab46..bb996e00d352abfe586884082ceb33beb4051530 100644 (file)
                             var res = buildHrefAndPath(obj);
                             obj.displayPath = pathSplitter(res[0]);
                             obj.fullPath = obj.displayPath + obj.name;
+                            if (obj.ty === TY_KEYWORD) {
+                                // To be sure than it isn't considered as duplicate with items.
+                                obj.fullPath += '|k';
+                            }
                             obj.href = res[1];
                             out.push(obj);
                             if (out.length >= MAX_RESULTS) {
                     case "fn":
                         return (name == "method" || name == "tymethod");
                     case "type":
-                        return (name == "primitive");
+                        return (name == "primitive" || name == "keyword");
                 }
 
                 // No match