Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/handlers/mutability_errors.rs')
-rw-r--r--crates/ide-diagnostics/src/handlers/mutability_errors.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ide-diagnostics/src/handlers/mutability_errors.rs b/crates/ide-diagnostics/src/handlers/mutability_errors.rs
index e4ee066653..5c6c979416 100644
--- a/crates/ide-diagnostics/src/handlers/mutability_errors.rs
+++ b/crates/ide-diagnostics/src/handlers/mutability_errors.rs
@@ -7,7 +7,10 @@ use crate::{Diagnostic, DiagnosticCode, DiagnosticsContext, fix};
// Diagnostic: need-mut
//
// This diagnostic is triggered on mutating an immutable variable.
-pub(crate) fn need_mut(ctx: &DiagnosticsContext<'_, '_>, d: &hir::NeedMut) -> Option<Diagnostic> {
+pub(crate) fn need_mut(
+ ctx: &DiagnosticsContext<'_, '_>,
+ d: &hir::NeedMut<'_>,
+) -> Option<Diagnostic> {
let root = d.span.file_id.parse_or_expand(ctx.sema.db);
let node = d.span.value.to_node(&root);
let mut span = d.span;
@@ -64,7 +67,7 @@ pub(crate) fn need_mut(ctx: &DiagnosticsContext<'_, '_>, d: &hir::NeedMut) -> Op
// This diagnostic is triggered when a mutable variable isn't actually mutated.
pub(crate) fn unused_mut(
ctx: &DiagnosticsContext<'_, '_>,
- d: &hir::UnusedMut,
+ d: &hir::UnusedMut<'_>,
) -> Option<Diagnostic> {
let ast = d.local.primary_source(ctx.sema.db).syntax_ptr();
let fixes = (|| {