aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/display/structure.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/display/structure.rs')
-rw-r--r--crates/ra_ide/src/display/structure.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ra_ide/src/display/structure.rs b/crates/ra_ide/src/display/structure.rs
index fdd589648..944cc79df 100644
--- a/crates/ra_ide/src/display/structure.rs
+++ b/crates/ra_ide/src/display/structure.rs
@@ -2,7 +2,6 @@
2 2
3use crate::TextRange; 3use crate::TextRange;
4 4
5use hir::{name, AsName, Path};
6use ra_syntax::{ 5use ra_syntax::{
7 ast::{self, AttrsOwner, NameOwner, TypeAscriptionOwner, TypeParamsOwner}, 6 ast::{self, AttrsOwner, NameOwner, TypeAscriptionOwner, TypeParamsOwner},
8 match_ast, AstNode, SourceFile, SyntaxKind, SyntaxNode, WalkEvent, 7 match_ast, AstNode, SourceFile, SyntaxKind, SyntaxNode, WalkEvent,
@@ -152,9 +151,8 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
152 Some(node) 151 Some(node)
153 }, 152 },
154 ast::MacroCall(it) => { 153 ast::MacroCall(it) => {
155 match it.path().and_then(|p| Path::from_ast(p)) { 154 match it.path().and_then(|it| it.segment()).and_then(|it| it.name_ref()) {
156 Some(path) if path.mod_path().segments.as_slice() == [name![macro_rules]] 155 Some(path_segment) if path_segment.text() == "macro_rules"
157 && it.name().map(|n| n.as_name()).is_some()
158 => decl(it), 156 => decl(it),
159 _ => None, 157 _ => None,
160 } 158 }