aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir/src/lib.rs3
-rw-r--r--crates/ra_ide/src/display/structure.rs6
2 files changed, 3 insertions, 6 deletions
diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs
index 94da70cca..3d13978d4 100644
--- a/crates/ra_hir/src/lib.rs
+++ b/crates/ra_hir/src/lib.rs
@@ -58,7 +58,6 @@ pub use hir_def::{
58 type_ref::Mutability, 58 type_ref::Mutability,
59}; 59};
60pub use hir_expand::{ 60pub use hir_expand::{
61 name::name, name::AsName, name::Name, HirFileId, InFile, MacroCallId, MacroCallLoc, MacroDefId, 61 name::Name, HirFileId, InFile, MacroCallId, MacroCallLoc, MacroDefId, MacroFile, Origin,
62 MacroFile, Origin,
63}; 62};
64pub use hir_ty::{display::HirDisplay, CallableDef}; 63pub use hir_ty::{display::HirDisplay, CallableDef};
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 }