diff options
Diffstat (limited to 'crates/ide_db/src')
-rw-r--r-- | crates/ide_db/src/search.rs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/crates/ide_db/src/search.rs b/crates/ide_db/src/search.rs index ff10f71c3..2df4894a1 100644 --- a/crates/ide_db/src/search.rs +++ b/crates/ide_db/src/search.rs | |||
@@ -121,9 +121,9 @@ impl Definition { | |||
121 | 121 | ||
122 | if let Definition::Local(var) = self { | 122 | if let Definition::Local(var) = self { |
123 | let range = match var.parent(db) { | 123 | let range = match var.parent(db) { |
124 | DefWithBody::Function(f) => f.source(db).value.syntax().text_range(), | 124 | DefWithBody::Function(f) => f.source_old(db).value.syntax().text_range(), |
125 | DefWithBody::Const(c) => c.source(db).value.syntax().text_range(), | 125 | DefWithBody::Const(c) => c.source_old(db).value.syntax().text_range(), |
126 | DefWithBody::Static(s) => s.source(db).value.syntax().text_range(), | 126 | DefWithBody::Static(s) => s.source_old(db).value.syntax().text_range(), |
127 | }; | 127 | }; |
128 | let mut res = FxHashMap::default(); | 128 | let mut res = FxHashMap::default(); |
129 | res.insert(file_id, Some(range)); | 129 | res.insert(file_id, Some(range)); |
@@ -132,17 +132,17 @@ impl Definition { | |||
132 | 132 | ||
133 | if let Definition::LifetimeParam(param) = self { | 133 | if let Definition::LifetimeParam(param) = self { |
134 | let range = match param.parent(db) { | 134 | let range = match param.parent(db) { |
135 | hir::GenericDef::Function(it) => it.source(db).value.syntax().text_range(), | 135 | hir::GenericDef::Function(it) => it.source_old(db).value.syntax().text_range(), |
136 | hir::GenericDef::Adt(it) => match it { | 136 | hir::GenericDef::Adt(it) => match it { |
137 | hir::Adt::Struct(it) => it.source(db).value.syntax().text_range(), | 137 | hir::Adt::Struct(it) => it.source_old(db).value.syntax().text_range(), |
138 | hir::Adt::Union(it) => it.source(db).value.syntax().text_range(), | 138 | hir::Adt::Union(it) => it.source_old(db).value.syntax().text_range(), |
139 | hir::Adt::Enum(it) => it.source(db).value.syntax().text_range(), | 139 | hir::Adt::Enum(it) => it.source_old(db).value.syntax().text_range(), |
140 | }, | 140 | }, |
141 | hir::GenericDef::Trait(it) => it.source(db).value.syntax().text_range(), | 141 | hir::GenericDef::Trait(it) => it.source_old(db).value.syntax().text_range(), |
142 | hir::GenericDef::TypeAlias(it) => it.source(db).value.syntax().text_range(), | 142 | hir::GenericDef::TypeAlias(it) => it.source_old(db).value.syntax().text_range(), |
143 | hir::GenericDef::Impl(it) => it.source(db).value.syntax().text_range(), | 143 | hir::GenericDef::Impl(it) => it.source_old(db).value.syntax().text_range(), |
144 | hir::GenericDef::Variant(it) => it.source(db).value.syntax().text_range(), | 144 | hir::GenericDef::Variant(it) => it.source_old(db).value.syntax().text_range(), |
145 | hir::GenericDef::Const(it) => it.source(db).value.syntax().text_range(), | 145 | hir::GenericDef::Const(it) => it.source_old(db).value.syntax().text_range(), |
146 | }; | 146 | }; |
147 | let mut res = FxHashMap::default(); | 147 | let mut res = FxHashMap::default(); |
148 | res.insert(file_id, Some(range)); | 148 | res.insert(file_id, Some(range)); |