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/src/diagnostics | |
parent | 2de2b1eca3c3a3a74c0374f4de0b0c3ff25e66a9 (diff) |
Mark HasSource::source_old as deprecated but allow at all call sites
Diffstat (limited to 'crates/ide/src/diagnostics')
-rw-r--r-- | crates/ide/src/diagnostics/fixes.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs index 702e8239d..0b5e0a4c1 100644 --- a/crates/ide/src/diagnostics/fixes.rs +++ b/crates/ide/src/diagnostics/fixes.rs | |||
@@ -156,6 +156,7 @@ fn missing_record_expr_field_fix( | |||
156 | let record_fields = match VariantDef::from(def_id) { | 156 | let record_fields = match VariantDef::from(def_id) { |
157 | VariantDef::Struct(s) => { | 157 | VariantDef::Struct(s) => { |
158 | module = s.module(sema.db); | 158 | module = s.module(sema.db); |
159 | #[allow(deprecated)] | ||
159 | let source = s.source_old(sema.db); | 160 | let source = s.source_old(sema.db); |
160 | def_file_id = source.file_id; | 161 | def_file_id = source.file_id; |
161 | let fields = source.value.field_list()?; | 162 | let fields = source.value.field_list()?; |
@@ -163,12 +164,14 @@ fn missing_record_expr_field_fix( | |||
163 | } | 164 | } |
164 | VariantDef::Union(u) => { | 165 | VariantDef::Union(u) => { |
165 | module = u.module(sema.db); | 166 | module = u.module(sema.db); |
167 | #[allow(deprecated)] | ||
166 | let source = u.source_old(sema.db); | 168 | let source = u.source_old(sema.db); |
167 | def_file_id = source.file_id; | 169 | def_file_id = source.file_id; |
168 | source.value.record_field_list()? | 170 | source.value.record_field_list()? |
169 | } | 171 | } |
170 | VariantDef::Variant(e) => { | 172 | VariantDef::Variant(e) => { |
171 | module = e.module(sema.db); | 173 | module = e.module(sema.db); |
174 | #[allow(deprecated)] | ||
172 | let source = e.source_old(sema.db); | 175 | let source = e.source_old(sema.db); |
173 | def_file_id = source.file_id; | 176 | def_file_id = source.file_id; |
174 | let fields = source.value.field_list()?; | 177 | let fields = source.value.field_list()?; |