aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/references.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/references.rs')
-rw-r--r--crates/ra_ide_api/src/references.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide_api/src/references.rs
index a75042b76..12cdc6a6d 100644
--- a/crates/ra_ide_api/src/references.rs
+++ b/crates/ra_ide_api/src/references.rs
@@ -148,9 +148,9 @@ fn rename_mod(
148 let mut file_system_edits = Vec::new(); 148 let mut file_system_edits = Vec::new();
149 if let Some(module) = source_binder::module_from_declaration(db, position.file_id, &ast_module) 149 if let Some(module) = source_binder::module_from_declaration(db, position.file_id, &ast_module)
150 { 150 {
151 let (file_id, module_source) = module.definition_source(db); 151 let src = module.definition_source(db);
152 let file_id = file_id.as_original_file(); 152 let file_id = src.file_id.as_original_file();
153 match module_source { 153 match src.ast {
154 ModuleSource::SourceFile(..) => { 154 ModuleSource::SourceFile(..) => {
155 let mod_path: RelativePathBuf = db.file_relative_path(file_id); 155 let mod_path: RelativePathBuf = db.file_relative_path(file_id);
156 // mod is defined in path/to/dir/mod.rs 156 // mod is defined in path/to/dir/mod.rs