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.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide-diagnostics/src/handlers/mutability_errors.rs b/crates/ide-diagnostics/src/handlers/mutability_errors.rs
index 4f528dea55..5d25f2c6a9 100644
--- a/crates/ide-diagnostics/src/handlers/mutability_errors.rs
+++ b/crates/ide-diagnostics/src/handlers/mutability_errors.rs
@@ -39,7 +39,7 @@ pub(crate) fn need_mut(ctx: &DiagnosticsContext<'_>, d: &hir::NeedMut) -> Option
Some(vec![fix(
"add_mut",
"Change it to be mutable",
- SourceChange::from_text_edit(file_id, edit),
+ SourceChange::from_text_edit(file_id.file_id(ctx.sema.db), edit),
use_range,
)])
})();
@@ -82,7 +82,7 @@ pub(crate) fn unused_mut(ctx: &DiagnosticsContext<'_>, d: &hir::UnusedMut) -> Op
Some(vec![fix(
"remove_mut",
"Remove unnecessary `mut`",
- SourceChange::from_text_edit(file_id, edit),
+ SourceChange::from_text_edit(file_id.file_id(ctx.sema.db), edit),
use_range,
)])
})();