diff options
author | Nick Spain <[email protected]> | 2021-01-01 02:05:28 +0000 |
---|---|---|
committer | Nick Spain <[email protected]> | 2021-01-02 10:53:51 +0000 |
commit | 27cadcd531c017aa7c78c6f7a36f2b7f2ce8a196 (patch) | |
tree | 24f43261eeafffc8b98be361c9c2841c2e4861f0 /crates/ide/src/diagnostics | |
parent | aa3ce16f2641b7eb562a8eae67738b0ff0c0b7b0 (diff) |
HasSource::source -> HasSource::source_old
To start migrating HasSource::source to return an Option.
Diffstat (limited to 'crates/ide/src/diagnostics')
-rw-r--r-- | crates/ide/src/diagnostics/fixes.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs index d79f5c170..702e8239d 100644 --- a/crates/ide/src/diagnostics/fixes.rs +++ b/crates/ide/src/diagnostics/fixes.rs | |||
@@ -156,20 +156,20 @@ 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 | let source = s.source(sema.db); | 159 | let source = s.source_old(sema.db); |
160 | def_file_id = source.file_id; | 160 | def_file_id = source.file_id; |
161 | let fields = source.value.field_list()?; | 161 | let fields = source.value.field_list()?; |
162 | record_field_list(fields)? | 162 | record_field_list(fields)? |
163 | } | 163 | } |
164 | VariantDef::Union(u) => { | 164 | VariantDef::Union(u) => { |
165 | module = u.module(sema.db); | 165 | module = u.module(sema.db); |
166 | let source = u.source(sema.db); | 166 | let source = u.source_old(sema.db); |
167 | def_file_id = source.file_id; | 167 | def_file_id = source.file_id; |
168 | source.value.record_field_list()? | 168 | source.value.record_field_list()? |
169 | } | 169 | } |
170 | VariantDef::Variant(e) => { | 170 | VariantDef::Variant(e) => { |
171 | module = e.module(sema.db); | 171 | module = e.module(sema.db); |
172 | let source = e.source(sema.db); | 172 | let source = e.source_old(sema.db); |
173 | def_file_id = source.file_id; | 173 | def_file_id = source.file_id; |
174 | let fields = source.value.field_list()?; | 174 | let fields = source.value.field_list()?; |
175 | record_field_list(fields)? | 175 | record_field_list(fields)? |