Rename Source -> InFile

This commit is contained in:
Aleksey Kladov 2019-11-28 12:50:26 +03:00
parent 2702fa1c5d
commit ccd1b0800a
36 changed files with 189 additions and 189 deletions

View file

@ -1,6 +1,6 @@
//! FIXME: write short doc here
use hir::Source;
use hir::InFile;
use itertools::Itertools;
use ra_db::SourceDatabase;
use ra_syntax::{
@ -66,8 +66,8 @@ fn runnable_mod(db: &RootDatabase, file_id: FileId, module: ast::Module) -> Opti
return None;
}
let range = module.syntax().text_range();
let src = hir::ModuleSource::from_child_node(db, Source::new(file_id.into(), &module.syntax()));
let module = hir::Module::from_definition(db, Source::new(file_id.into(), src))?;
let src = hir::ModuleSource::from_child_node(db, InFile::new(file_id.into(), &module.syntax()));
let module = hir::Module::from_definition(db, InFile::new(file_id.into(), src))?;
let path = module.path_to_root(db).into_iter().rev().filter_map(|it| it.name(db)).join("::");
Some(Runnable { range, kind: RunnableKind::TestMod { path } })