diff options
author | Nick Spain <[email protected]> | 2021-01-01 02:50:50 +0000 |
---|---|---|
committer | Nick Spain <[email protected]> | 2021-01-02 10:53:51 +0000 |
commit | ea4708c444509449b86c50b7b1b23f9ff5af4e97 (patch) | |
tree | 2c5c5c17589f0457ba9e63b4370eb9c6951b1d87 /crates/ide_db | |
parent | 2de2b1eca3c3a3a74c0374f4de0b0c3ff25e66a9 (diff) |
Mark HasSource::source_old as deprecated but allow at all call sites
Diffstat (limited to 'crates/ide_db')
-rw-r--r-- | crates/ide_db/src/search.rs | 2 |
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 { |