mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Turn ImplBlock into a copy type just containing IDs
This makes it more like the other code model types. Also make Module::definition_source/declaration_source return HirFileIds, to make them more like the other source functions.
This commit is contained in:
parent
6932b77093
commit
0242acae53
9 changed files with 65 additions and 77 deletions
|
@ -100,6 +100,7 @@ fn rename_mod(
|
|||
if let Some(module) = source_binder::module_from_declaration(db, position.file_id, &ast_module)
|
||||
{
|
||||
let (file_id, module_source) = module.definition_source(db);
|
||||
let file_id = file_id.as_original_file();
|
||||
match module_source {
|
||||
ModuleSource::SourceFile(..) => {
|
||||
let mod_path: RelativePathBuf = db.file_relative_path(file_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue