mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Rename Source -> InFile
This commit is contained in:
parent
2702fa1c5d
commit
ccd1b0800a
36 changed files with 189 additions and 189 deletions
|
@ -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 } })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue