aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_db/src')
-rw-r--r--crates/ide_db/src/search.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ide_db/src/search.rs b/crates/ide_db/src/search.rs
index 2df4894a1..e69f9d141 100644
--- a/crates/ide_db/src/search.rs
+++ b/crates/ide_db/src/search.rs
@@ -120,6 +120,7 @@ impl Definition {
120 let file_id = module_src.file_id.original_file(db); 120 let file_id = module_src.file_id.original_file(db);
121 121
122 if let Definition::Local(var) = self { 122 if let Definition::Local(var) = self {
123 #[allow(deprecated)]
123 let range = match var.parent(db) { 124 let range = match var.parent(db) {
124 DefWithBody::Function(f) => f.source_old(db).value.syntax().text_range(), 125 DefWithBody::Function(f) => f.source_old(db).value.syntax().text_range(),
125 DefWithBody::Const(c) => c.source_old(db).value.syntax().text_range(), 126 DefWithBody::Const(c) => c.source_old(db).value.syntax().text_range(),
@@ -131,6 +132,7 @@ impl Definition {
131 } 132 }
132 133
133 if let Definition::LifetimeParam(param) = self { 134 if let Definition::LifetimeParam(param) = self {
135 #[allow(deprecated)]
134 let range = match param.parent(db) { 136 let range = match param.parent(db) {
135 hir::GenericDef::Function(it) => it.source_old(db).value.syntax().text_range(), 137 hir::GenericDef::Function(it) => it.source_old(db).value.syntax().text_range(),
136 hir::GenericDef::Adt(it) => match it { 138 hir::GenericDef::Adt(it) => match it {