aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/diagnostics.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs
index 30b95a215..6602fd27e 100644
--- a/crates/ra_ide_api/src/diagnostics.rs
+++ b/crates/ra_ide_api/src/diagnostics.rs
@@ -59,7 +59,9 @@ pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic>
59 let node = d.ast(db); 59 let node = d.ast(db);
60 let mut ast_editor = AstEditor::new(node); 60 let mut ast_editor = AstEditor::new(node);
61 for f in d.missed_fields.iter() { 61 for f in d.missed_fields.iter() {
62 ast_editor.append_field(&AstBuilder::<RecordField>::from_name(f)); 62 let name_ref = AstBuilder::<ast::NameRef>::new(&f.to_string());
63 let unit = AstBuilder::<ast::Expr>::unit();
64 ast_editor.append_field(&AstBuilder::<RecordField>::from_pieces(name_ref, Some(unit)));
63 } 65 }
64 66
65 let mut builder = TextEditBuilder::default(); 67 let mut builder = TextEditBuilder::default();