diff options
Diffstat (limited to 'crates/ide/src/display')
-rw-r--r-- | crates/ide/src/display/navigation_target.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/ide/src/display/navigation_target.rs b/crates/ide/src/display/navigation_target.rs index 234f80a3a..73fc73619 100644 --- a/crates/ide/src/display/navigation_target.rs +++ b/crates/ide/src/display/navigation_target.rs | |||
@@ -176,7 +176,15 @@ impl ToNav for FileSymbol { | |||
176 | impl TryToNav for Definition { | 176 | impl TryToNav for Definition { |
177 | fn try_to_nav(&self, db: &RootDatabase) -> Option<NavigationTarget> { | 177 | fn try_to_nav(&self, db: &RootDatabase) -> Option<NavigationTarget> { |
178 | match self { | 178 | match self { |
179 | Definition::Macro(it) => Some(it.to_nav(db)), | 179 | Definition::Macro(it) => { |
180 | // FIXME: Currently proc-macro do not have ast-node, | ||
181 | // such that it does not have source | ||
182 | // more discussion: https://github.com/rust-analyzer/rust-analyzer/issues/6913 | ||
183 | if it.is_proc_macro() { | ||
184 | return None; | ||
185 | } | ||
186 | Some(it.to_nav(db)) | ||
187 | } | ||
180 | Definition::Field(it) => Some(it.to_nav(db)), | 188 | Definition::Field(it) => Some(it.to_nav(db)), |
181 | Definition::ModuleDef(it) => it.try_to_nav(db), | 189 | Definition::ModuleDef(it) => it.try_to_nav(db), |
182 | Definition::SelfType(it) => Some(it.to_nav(db)), | 190 | Definition::SelfType(it) => Some(it.to_nav(db)), |