aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/diagnostics/fixes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src/diagnostics/fixes.rs')
-rw-r--r--crates/ide/src/diagnostics/fixes.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs
index 24d08651e..29c7a040b 100644
--- a/crates/ide/src/diagnostics/fixes.rs
+++ b/crates/ide/src/diagnostics/fixes.rs
@@ -8,7 +8,7 @@ use hir::{
8 }, 8 },
9 HasSource, HirDisplay, Semantics, VariantDef, 9 HasSource, HirDisplay, Semantics, VariantDef,
10}; 10};
11use ide_db::base_db::FileId; 11use ide_db::base_db::{AnchoredPathBuf, FileId};
12use ide_db::{ 12use ide_db::{
13 source_change::{FileSystemEdit, SourceFileEdit}, 13 source_change::{FileSystemEdit, SourceFileEdit},
14 RootDatabase, 14 RootDatabase,
@@ -36,8 +36,10 @@ impl DiagnosticWithFix for UnresolvedModule {
36 Some(Fix::new( 36 Some(Fix::new(
37 "Create module", 37 "Create module",
38 FileSystemEdit::CreateFile { 38 FileSystemEdit::CreateFile {
39 anchor: self.file.original_file(sema.db), 39 dst: AnchoredPathBuf {
40 dst: self.candidate.clone(), 40 anchor: self.file.original_file(sema.db),
41 path: self.candidate.clone(),
42 },
41 } 43 }
42 .into(), 44 .into(),
43 unresolved_module.syntax().text_range(), 45 unresolved_module.syntax().text_range(),