mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
single_match
This commit is contained in:
parent
9dd07f0bc4
commit
b1a0c9ac40
14 changed files with 89 additions and 130 deletions
|
@ -282,8 +282,8 @@ fn traverse(
|
|||
inside_attribute = false
|
||||
}
|
||||
|
||||
Enter(NodeOrToken::Node(node)) => match ast::Item::cast(node.clone()) {
|
||||
Some(item) => {
|
||||
Enter(NodeOrToken::Node(node)) => {
|
||||
if let Some(item) = ast::Item::cast(node.clone()) {
|
||||
match item {
|
||||
ast::Item::MacroRules(mac) => {
|
||||
macro_highlighter.init();
|
||||
|
@ -324,8 +324,7 @@ fn traverse(
|
|||
}
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
}
|
||||
Leave(NodeOrToken::Node(node)) if ast::Item::can_cast(node.kind()) => {
|
||||
match ast::Item::cast(node.clone()) {
|
||||
Some(ast::Item::MacroRules(mac)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue