]> git.lizzy.rs Git - rust.git/commitdiff
Allow function@, value@, macro@
authorManish Goregaokar <manishsmail@gmail.com>
Fri, 19 Jan 2018 11:15:48 +0000 (16:45 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Mon, 22 Jan 2018 09:54:31 +0000 (15:24 +0530)
src/librustdoc/clean/mod.rs

index 5a09197fd41945b5f50bc0e6d9b8f3b1dec780a4..1734071f849bcb826e9410dfb8c1909275ed9c06 100644 (file)
@@ -862,13 +862,17 @@ fn clean(&self, cx: &DocContext) -> Attributes {
                         kind = PathKind::Type;
                         link.trim_left_matches(prefix)
                     } else if let Some(prefix) =
-                        ["const@", "static@"].iter()
-                                           .find(|p| link.starts_with(**p)) {
+                        ["const@", "static@",
+                         "value@", "function@"].iter()
+                                               .find(|p| link.starts_with(**p)) {
                         kind = PathKind::Value;
                         link.trim_left_matches(prefix)
                     } else if link.ends_with("()") {
                         kind = PathKind::Value;
                         link.trim_right_matches("()")
+                    } else if link.starts_with("macro@") {
+                        kind = PathKind::Macro;
+                        link.trim_left_matches("macro@")
                     } else if link.ends_with('!') {
                         kind = PathKind::Macro;
                         link.trim_right_matches('!')