diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2018-01-19 16:45:48 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2018-01-22 15:24:31 +0530 |
| commit | 869dd91d443b10e11d20d93beb9c06cb0fd7ec42 (patch) | |
| tree | 6d4b4e6545754ea60ebf203587d97bec04359caa | |
| parent | 6a1a449220d01dbee0f26b5f1b50a012e6b1bd30 (diff) | |
| download | rust-869dd91d443b10e11d20d93beb9c06cb0fd7ec42.tar.gz rust-869dd91d443b10e11d20d93beb9c06cb0fd7ec42.zip | |
Allow function@, value@, macro@
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 5a09197fd41..1734071f849 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -862,13 +862,17 @@ impl Clean<Attributes> for [ast::Attribute] { 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('!') |
