mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-05 03:23:25 +00:00
Allow function@, value@, macro@
This commit is contained in:
parent
6a1a449220
commit
869dd91d44
@ -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('!')
|
||||
|
Loading…
Reference in New Issue
Block a user