rename ModuleDescriptor -> Module

This commit is contained in:
Aleksey Kladov 2018-11-28 01:19:55 +03:00
parent 16f67ee384
commit 36b1d20c16
5 changed files with 34 additions and 35 deletions

View file

@ -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;

View file

@ -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() {