mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
rename ModuleDescriptor -> Module
This commit is contained in:
parent
16f67ee384
commit
36b1d20c16
5 changed files with 34 additions and 35 deletions
|
@ -11,9 +11,7 @@ use rustc_hash::{FxHashMap};
|
|||
|
||||
use crate::{
|
||||
db::{self, SyntaxDatabase},
|
||||
hir::
|
||||
ModuleDescriptor
|
||||
,
|
||||
hir,
|
||||
Cancelable, FilePosition
|
||||
};
|
||||
|
||||
|
@ -38,7 +36,7 @@ pub(crate) fn completions(
|
|||
original_file.reparse(&edit)
|
||||
};
|
||||
|
||||
let module = ctry!(ModuleDescriptor::guess_from_position(db, position)?);
|
||||
let module = ctry!(hir::Module::guess_from_position(db, position)?);
|
||||
|
||||
let mut res = Vec::new();
|
||||
let mut has_completions = false;
|
||||
|
|
|
@ -11,7 +11,7 @@ use crate::{
|
|||
db::RootDatabase,
|
||||
completion::CompletionItem,
|
||||
hir::{
|
||||
ModuleDescriptor,
|
||||
self,
|
||||
FnScopes,
|
||||
Def,
|
||||
Path,
|
||||
|
@ -22,7 +22,7 @@ use crate::{
|
|||
pub(super) fn completions(
|
||||
acc: &mut Vec<CompletionItem>,
|
||||
db: &RootDatabase,
|
||||
module: &ModuleDescriptor,
|
||||
module: &hir::Module,
|
||||
file: &SourceFileNode,
|
||||
name_ref: ast::NameRef,
|
||||
) -> Cancelable<()> {
|
||||
|
@ -150,7 +150,7 @@ fn complete_fn(name_ref: ast::NameRef, scopes: &FnScopes, acc: &mut Vec<Completi
|
|||
fn complete_path(
|
||||
acc: &mut Vec<CompletionItem>,
|
||||
db: &RootDatabase,
|
||||
module: &ModuleDescriptor,
|
||||
module: &hir::Module,
|
||||
mut path: Path,
|
||||
) -> Cancelable<()> {
|
||||
if path.segments.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue