diff options
Diffstat (limited to 'crates/ide/src/diagnostics.rs')
-rw-r--r-- | crates/ide/src/diagnostics.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ide/src/diagnostics.rs b/crates/ide/src/diagnostics.rs index 075aae8d5..ef8c8044c 100644 --- a/crates/ide/src/diagnostics.rs +++ b/crates/ide/src/diagnostics.rs | |||
@@ -5,6 +5,7 @@ | |||
5 | //! original files. So we need to map the ranges. | 5 | //! original files. So we need to map the ranges. |
6 | 6 | ||
7 | mod unresolved_module; | 7 | mod unresolved_module; |
8 | mod missing_fields; | ||
8 | 9 | ||
9 | mod fixes; | 10 | mod fixes; |
10 | mod field_shorthand; | 11 | mod field_shorthand; |
@@ -123,9 +124,6 @@ pub(crate) fn diagnostics( | |||
123 | } | 124 | } |
124 | let res = RefCell::new(res); | 125 | let res = RefCell::new(res); |
125 | let sink_builder = DiagnosticSinkBuilder::new() | 126 | let sink_builder = DiagnosticSinkBuilder::new() |
126 | .on::<hir::diagnostics::MissingFields, _>(|d| { | ||
127 | res.borrow_mut().push(diagnostic_with_fix(d, &sema, resolve)); | ||
128 | }) | ||
129 | .on::<hir::diagnostics::MissingOkOrSomeInTailExpr, _>(|d| { | 127 | .on::<hir::diagnostics::MissingOkOrSomeInTailExpr, _>(|d| { |
130 | res.borrow_mut().push(diagnostic_with_fix(d, &sema, resolve)); | 128 | res.borrow_mut().push(diagnostic_with_fix(d, &sema, resolve)); |
131 | }) | 129 | }) |
@@ -232,7 +230,8 @@ pub(crate) fn diagnostics( | |||
232 | let ctx = DiagnosticsContext { config, sema, resolve }; | 230 | let ctx = DiagnosticsContext { config, sema, resolve }; |
233 | for diag in diags { | 231 | for diag in diags { |
234 | let d = match diag { | 232 | let d = match diag { |
235 | AnyDiagnostic::UnresolvedModule(d) => unresolved_module::render(&ctx, &d), | 233 | AnyDiagnostic::UnresolvedModule(d) => unresolved_module::unresolved_module(&ctx, &d), |
234 | AnyDiagnostic::MissingFields(d) => missing_fields::missing_fields(&ctx, &d), | ||
236 | }; | 235 | }; |
237 | if let Some(code) = d.code { | 236 | if let Some(code) = d.code { |
238 | if ctx.config.disabled.contains(code.as_str()) { | 237 | if ctx.config.disabled.contains(code.as_str()) { |