Use original_file instead of as_original_file

This commit is contained in:
Shotaro Yamada 2019-10-11 06:50:53 +09:00
parent 3b4c506f33
commit 04741ae2bc
2 changed files with 4 additions and 4 deletions

View file

@ -140,7 +140,7 @@ fn rename_mod(
let module_src = hir::Source { file_id: position.file_id.into(), ast: ast_module.clone() };
if let Some(module) = hir::Module::from_declaration(db, module_src) {
let src = module.definition_source(db);
let file_id = src.file_id.as_original_file();
let file_id = src.file_id.original_file(db);
match src.ast {
ModuleSource::SourceFile(..) => {
let mod_path: RelativePathBuf = db.file_relative_path(file_id);