aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/diagnostics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/diagnostics.rs')
-rw-r--r--crates/ra_ide_api/src/diagnostics.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs
index 855a3ff0f..e23d178b0 100644
--- a/crates/ra_ide_api/src/diagnostics.rs
+++ b/crates/ra_ide_api/src/diagnostics.rs
@@ -54,7 +54,7 @@ pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic>
54 let file_id = d.file().original_file(db); 54 let file_id = d.file().original_file(db);
55 let source_file = db.parse(file_id); 55 let source_file = db.parse(file_id);
56 let syntax_node = d.syntax_node_ptr(); 56 let syntax_node = d.syntax_node_ptr();
57 let node = NamedFieldList::cast(syntax_node.to_node(&source_file)).unwrap(); 57 let node = NamedFieldList::cast(syntax_node.to_node(source_file.syntax())).unwrap();
58 let mut ast_editor = AstEditor::new(node); 58 let mut ast_editor = AstEditor::new(node);
59 for f in d.missed_fields.iter() { 59 for f in d.missed_fields.iter() {
60 ast_editor.append_field(&AstBuilder::<NamedField>::from_name(f)); 60 ast_editor.append_field(&AstBuilder::<NamedField>::from_name(f));
@@ -281,7 +281,7 @@ mod tests {
281 one: i32, 281 one: i32,
282 two: i64, 282 two: i64,
283 } 283 }
284 284
285 fn test_fn() { 285 fn test_fn() {
286 let one = 1; 286 let one = 1;
287 let s = TestStruct{ one, two: 2 }; 287 let s = TestStruct{ one, two: 2 };
@@ -298,7 +298,7 @@ mod tests {
298 one: i32, 298 one: i32,
299 two: i64, 299 two: i64,
300 } 300 }
301 301
302 fn test_fn() { 302 fn test_fn() {
303 let one = 1; 303 let one = 1;
304 let s = TestStruct{ ..a }; 304 let s = TestStruct{ ..a };