Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/extract_module.rs')
-rw-r--r--crates/ide-assists/src/handlers/extract_module.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/crates/ide-assists/src/handlers/extract_module.rs b/crates/ide-assists/src/handlers/extract_module.rs
index 42f935651c..e4cba666af 100644
--- a/crates/ide-assists/src/handlers/extract_module.rs
+++ b/crates/ide-assists/src/handlers/extract_module.rs
@@ -4,10 +4,9 @@ use either::Either;
use hir::{HasSource, HirFileIdExt, ModuleSource};
use ide_db::{
assists::{AssistId, AssistKind},
- base_db::FileId,
defs::{Definition, NameClass, NameRefClass},
search::{FileReference, SearchScope},
- FxHashMap, FxHashSet,
+ FileId, FxHashMap, FxHashSet,
};
use itertools::Itertools;
use smallvec::SmallVec;
@@ -364,7 +363,7 @@ impl Module {
None
});
- refs_in_files.entry(file_id).or_default().extend(usages);
+ refs_in_files.entry(file_id.file_id()).or_default().extend(usages);
}
}
@@ -477,8 +476,13 @@ impl Module {
}
}
- let (def_in_mod, def_out_sel) =
- check_def_in_mod_and_out_sel(def, ctx, curr_parent_module, selection_range, file_id);
+ let (def_in_mod, def_out_sel) = check_def_in_mod_and_out_sel(
+ def,
+ ctx,
+ curr_parent_module,
+ selection_range,
+ file_id.file_id(),
+ );
// Find use stmt that use def in current file
let use_stmt: Option<ast::Use> = usage_res