mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-06 10:30:43 +00:00
Move to upstream macro_rules!
model
This commit is contained in:
parent
39aae835fd
commit
c1cb595382
36 changed files with 325 additions and 275 deletions
|
@ -76,7 +76,7 @@ pub fn type_label(node: &ast::TypeAlias) -> String {
|
|||
label.trim().to_owned()
|
||||
}
|
||||
|
||||
pub fn macro_label(node: &ast::MacroCall) -> String {
|
||||
pub fn macro_label(node: &ast::MacroRules) -> String {
|
||||
let name = node.name().map(|name| name.syntax().text().to_string()).unwrap_or_default();
|
||||
let vis = if node.has_atom_attr("macro_export") { "#[macro_export]\n" } else { "" };
|
||||
format!("{}macro_rules! {}", vis, name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue