aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/src/display.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/syntax/src/display.rs')
-rw-r--r--crates/syntax/src/display.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/syntax/src/display.rs b/crates/syntax/src/display.rs
index 8d2c7eae4..d33bde30c 100644
--- a/crates/syntax/src/display.rs
+++ b/crates/syntax/src/display.rs
@@ -76,7 +76,7 @@ pub fn type_label(node: &ast::TypeAlias) -> String {
76 label.trim().to_owned() 76 label.trim().to_owned()
77} 77}
78 78
79pub fn macro_label(node: &ast::MacroCall) -> String { 79pub fn macro_label(node: &ast::MacroRules) -> String {
80 let name = node.name().map(|name| name.syntax().text().to_string()).unwrap_or_default(); 80 let name = node.name().map(|name| name.syntax().text().to_string()).unwrap_or_default();
81 let vis = if node.has_atom_attr("macro_export") { "#[macro_export]\n" } else { "" }; 81 let vis = if node.has_atom_attr("macro_export") { "#[macro_export]\n" } else { "" };
82 format!("{}macro_rules! {}", vis, name) 82 format!("{}macro_rules! {}", vis, name)