aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2020-01-12 10:08:53 +0000
committerEdwin Cheng <[email protected]>2020-01-12 10:08:53 +0000
commitd7be1a437239770552199028259639e6dfa8a664 (patch)
tree3b1d063a8f9b8786924577d6ebc16dd9aa682d51 /crates/ra_ide
parent86d2af9f7b3f6af2ea9e4eca2584aa501b60aa14 (diff)
Use attr location for builtin macro goto-imp
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/display/navigation_target.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs
index f2e45fa31..b2af3479c 100644
--- a/crates/ra_ide/src/display/navigation_target.rs
+++ b/crates/ra_ide/src/display/navigation_target.rs
@@ -251,7 +251,11 @@ impl ToNav for hir::Module {
251impl ToNav for hir::ImplBlock { 251impl ToNav for hir::ImplBlock {
252 fn to_nav(&self, db: &RootDatabase) -> NavigationTarget { 252 fn to_nav(&self, db: &RootDatabase) -> NavigationTarget {
253 let src = self.source(db); 253 let src = self.source(db);
254 let frange = original_range(db, src.as_ref().map(|it| it.syntax())); 254 let frange = if let Some(item) = self.is_builtin_derive(db) {
255 original_range(db, item.syntax())
256 } else {
257 original_range(db, src.as_ref().map(|it| it.syntax()))
258 };
255 259
256 NavigationTarget::from_syntax( 260 NavigationTarget::from_syntax(
257 frange.file_id, 261 frange.file_id,