Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/handlers/missing_fields.rs')
| -rw-r--r-- | crates/ide-diagnostics/src/handlers/missing_fields.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/ide-diagnostics/src/handlers/missing_fields.rs b/crates/ide-diagnostics/src/handlers/missing_fields.rs index 117702923b..206d8caf90 100644 --- a/crates/ide-diagnostics/src/handlers/missing_fields.rs +++ b/crates/ide-diagnostics/src/handlers/missing_fields.rs @@ -33,7 +33,10 @@ use crate::{Diagnostic, DiagnosticCode, DiagnosticsContext, fix}; // // let a = A { a: 10 }; // ``` -pub(crate) fn missing_fields(ctx: &DiagnosticsContext<'_>, d: &hir::MissingFields) -> Diagnostic { +pub(crate) fn missing_fields( + ctx: &DiagnosticsContext<'_, '_>, + d: &hir::MissingFields, +) -> Diagnostic { let mut message = String::from("missing structure fields:\n"); for (field, _) in &d.missed_fields { format_to!(message, "- {}\n", field.display(ctx.sema.db, ctx.edition)); @@ -51,7 +54,7 @@ pub(crate) fn missing_fields(ctx: &DiagnosticsContext<'_>, d: &hir::MissingField .with_fixes(fixes(ctx, d)) } -fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::MissingFields) -> Option<Vec<Assist>> { +fn fixes(ctx: &DiagnosticsContext<'_, '_>, d: &hir::MissingFields) -> Option<Vec<Assist>> { // Note that although we could add a diagnostics to // fill the missing tuple field, e.g : // `struct A(usize);` @@ -202,7 +205,7 @@ fn make_ty( } fn get_default_constructor( - ctx: &DiagnosticsContext<'_>, + ctx: &DiagnosticsContext<'_, '_>, d: &hir::MissingFields, ty: &Type<'_>, ) -> Option<ast::Expr> { |