aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/diagnostics.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-30 15:49:39 +0100
committerGitHub <[email protected]>2020-07-30 15:49:39 +0100
commita257fd06b36d2e7310e5e38823f6636343a37331 (patch)
treee360ad1f518319883677364f49d75d5c508aafcd /crates/ra_ide/src/diagnostics.rs
parent282702c2877e3f9002308b1b63fc472b5e799c56 (diff)
parent0a9e3ccc262fbcbd4cdaab30384f8cb71584544b (diff)
Merge #5597
5597: Rename FieldDef -> Field r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/diagnostics.rs')
-rw-r--r--crates/ra_ide/src/diagnostics.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_ide/src/diagnostics.rs b/crates/ra_ide/src/diagnostics.rs
index efbb00d6d..dd8a7ffd9 100644
--- a/crates/ra_ide/src/diagnostics.rs
+++ b/crates/ra_ide/src/diagnostics.rs
@@ -155,21 +155,21 @@ fn missing_struct_field_fix(
155 module = s.module(sema.db); 155 module = s.module(sema.db);
156 let source = s.source(sema.db); 156 let source = s.source(sema.db);
157 def_file_id = source.file_id; 157 def_file_id = source.file_id;
158 let fields = source.value.field_def_list()?; 158 let fields = source.value.field_list()?;
159 record_field_def_list(fields)? 159 record_field_list(fields)?
160 } 160 }
161 VariantDef::Union(u) => { 161 VariantDef::Union(u) => {
162 module = u.module(sema.db); 162 module = u.module(sema.db);
163 let source = u.source(sema.db); 163 let source = u.source(sema.db);
164 def_file_id = source.file_id; 164 def_file_id = source.file_id;
165 source.value.record_field_def_list()? 165 source.value.record_field_list()?
166 } 166 }
167 VariantDef::EnumVariant(e) => { 167 VariantDef::EnumVariant(e) => {
168 module = e.module(sema.db); 168 module = e.module(sema.db);
169 let source = e.source(sema.db); 169 let source = e.source(sema.db);
170 def_file_id = source.file_id; 170 def_file_id = source.file_id;
171 let fields = source.value.field_def_list()?; 171 let fields = source.value.field_list()?;
172 record_field_def_list(fields)? 172 record_field_list(fields)?
173 } 173 }
174 }; 174 };
175 let def_file_id = def_file_id.original_file(sema.db); 175 let def_file_id = def_file_id.original_file(sema.db);
@@ -205,10 +205,10 @@ fn missing_struct_field_fix(
205 let fix = Fix::new("Create field", source_change.into()); 205 let fix = Fix::new("Create field", source_change.into());
206 return Some(fix); 206 return Some(fix);
207 207
208 fn record_field_def_list(field_def_list: ast::FieldDefList) -> Option<ast::RecordFieldDefList> { 208 fn record_field_list(field_def_list: ast::FieldList) -> Option<ast::RecordFieldList> {
209 match field_def_list { 209 match field_def_list {
210 ast::FieldDefList::RecordFieldDefList(it) => Some(it), 210 ast::FieldList::RecordFieldList(it) => Some(it),
211 ast::FieldDefList::TupleFieldDefList(_) => None, 211 ast::FieldList::TupleFieldList(_) => None,
212 } 212 }
213 } 213 }
214} 214}