Skip to content

Commit 869dd91

Browse files
committed
Allow function@, value@, macro@
1 parent 6a1a449 commit 869dd91

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,13 +862,17 @@ impl Clean<Attributes> for [ast::Attribute] {
862862
kind = PathKind::Type;
863863
link.trim_left_matches(prefix)
864864
} else if let Some(prefix) =
865-
["const@", "static@"].iter()
866-
.find(|p| link.starts_with(**p)) {
865+
["const@", "static@",
866+
"value@", "function@"].iter()
867+
.find(|p| link.starts_with(**p)) {
867868
kind = PathKind::Value;
868869
link.trim_left_matches(prefix)
869870
} else if link.ends_with("()") {
870871
kind = PathKind::Value;
871872
link.trim_right_matches("()")
873+
} else if link.starts_with("macro@") {
874+
kind = PathKind::Macro;
875+
link.trim_left_matches("macro@")
872876
} else if link.ends_with('!') {
873877
kind = PathKind::Macro;
874878
link.trim_right_matches('!')

0 commit comments

Comments
 (0)