diff options
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/diagnostics.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 254342c0a..1395cede2 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs | |||
@@ -129,7 +129,7 @@ fn check_struct_shorthand_initialization( | |||
129 | } | 129 | } |
130 | 130 | ||
131 | fn check_module(acc: &mut Vec<Diagnostic>, db: &RootDatabase, module: hir::Module) { | 131 | fn check_module(acc: &mut Vec<Diagnostic>, db: &RootDatabase, module: hir::Module) { |
132 | let mut diagnostics = hir::diagnostics::Diagnostics::default(); | 132 | let mut diagnostics = hir::diagnostics::DiagnosticSink::default(); |
133 | module.diagnostics(db, &mut diagnostics); | 133 | module.diagnostics(db, &mut diagnostics); |
134 | for decl in module.declarations(db) { | 134 | for decl in module.declarations(db) { |
135 | match decl { | 135 | match decl { |
@@ -138,7 +138,7 @@ fn check_module(acc: &mut Vec<Diagnostic>, db: &RootDatabase, module: hir::Modul | |||
138 | } | 138 | } |
139 | } | 139 | } |
140 | 140 | ||
141 | for d in diagnostics.iter() { | 141 | for d in diagnostics.into_diagnostics().iter() { |
142 | if let Some(d) = d.downcast_ref::<hir::diagnostics::UnresolvedModule>() { | 142 | if let Some(d) = d.downcast_ref::<hir::diagnostics::UnresolvedModule>() { |
143 | let source_root = db.file_source_root(d.file().original_file(db)); | 143 | let source_root = db.file_source_root(d.file().original_file(db)); |
144 | let create_file = FileSystemEdit::CreateFile { source_root, path: d.candidate.clone() }; | 144 | let create_file = FileSystemEdit::CreateFile { source_root, path: d.candidate.clone() }; |