mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Add prefix file_
to Semantics
's to_module_defs()
/to_module_def()
methods
This commit is contained in:
parent
0ac05c0527
commit
6112ddfabb
12 changed files with 16 additions and 16 deletions
|
@ -223,12 +223,12 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> {
|
|||
self.imp.resolve_variant(record_lit).map(VariantDef::from)
|
||||
}
|
||||
|
||||
pub fn to_module_def(&self, file: FileId) -> Option<Module> {
|
||||
self.imp.to_module_def(file).next()
|
||||
pub fn file_to_module_def(&self, file: FileId) -> Option<Module> {
|
||||
self.imp.file_to_module_defs(file).next()
|
||||
}
|
||||
|
||||
pub fn to_module_defs(&self, file: FileId) -> impl Iterator<Item = Module> {
|
||||
self.imp.to_module_def(file)
|
||||
pub fn file_to_module_defs(&self, file: FileId) -> impl Iterator<Item = Module> {
|
||||
self.imp.file_to_module_defs(file)
|
||||
}
|
||||
|
||||
pub fn to_struct_def(&self, s: &ast::Struct) -> Option<Struct> {
|
||||
|
@ -1237,7 +1237,7 @@ impl<'db> SemanticsImpl<'db> {
|
|||
T::to_def(self, src)
|
||||
}
|
||||
|
||||
fn to_module_def(&self, file: FileId) -> impl Iterator<Item = Module> {
|
||||
fn file_to_module_defs(&self, file: FileId) -> impl Iterator<Item = Module> {
|
||||
self.with_ctx(|ctx| ctx.file_to_def(file)).into_iter().map(Module::from)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue