From 410996893489f6c64b472e6128f099f1de229806 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Mon, 16 Nov 2020 21:24:54 +0200 Subject: Remove query aliases --- crates/completion/src/completions/unqualified_path.rs | 2 +- crates/hir/src/lib.rs | 2 +- crates/ide_db/src/imports_locator.rs | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/completion/src/completions/unqualified_path.rs b/crates/completion/src/completions/unqualified_path.rs index 362d31f25..4f8ec1e67 100644 --- a/crates/completion/src/completions/unqualified_path.rs +++ b/crates/completion/src/completions/unqualified_path.rs @@ -72,7 +72,7 @@ fn complete_enum_variants(acc: &mut Completions, ctx: &CompletionContext, ty: &T } fn fuzzy_completion(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> { - let _p = profile::span("fuzzy_completion®"); + let _p = profile::span("fuzzy_completion"); let current_module = ctx.scope.module()?; let anchor = ctx.name_ref_syntax.as_ref()?; let import_scope = ImportScope::find_insert_use_container(anchor.syntax(), &ctx.sema)?; diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 4b7ea3aa9..5fea25ef1 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -49,7 +49,7 @@ pub use hir_def::{ builtin_type::BuiltinType, docs::Documentation, find_path::PrefixKind, - import_map::Query as ExternalImportablesQuery, + import_map, item_scope::ItemInNs, nameres::ModuleSource, path::{ModPath, PathKind}, diff --git a/crates/ide_db/src/imports_locator.rs b/crates/ide_db/src/imports_locator.rs index 1b21f76ac..9d8ea7368 100644 --- a/crates/ide_db/src/imports_locator.rs +++ b/crates/ide_db/src/imports_locator.rs @@ -1,12 +1,12 @@ //! This module contains an import search funcionality that is provided to the assists module. //! Later, this should be moved away to a separate crate that is accessible from the assists module. -use hir::{Crate, ExternalImportablesQuery, MacroDef, ModuleDef, Semantics}; +use hir::{import_map, Crate, MacroDef, ModuleDef, Semantics}; use syntax::{ast, AstNode, SyntaxKind::NAME}; use crate::{ defs::{Definition, NameClass}, - symbol_index::{self, FileSymbol, Query as LocalImportablesQuery}, + symbol_index::{self, FileSymbol}, RootDatabase, }; use either::Either; @@ -22,12 +22,12 @@ pub fn find_exact_imports<'a>( sema, krate, { - let mut local_query = LocalImportablesQuery::new(name_to_import.to_string()); + let mut local_query = symbol_index::Query::new(name_to_import.to_string()); local_query.exact(); local_query.limit(40); local_query }, - ExternalImportablesQuery::new(name_to_import).anchor_end().case_sensitive().limit(40), + import_map::Query::new(name_to_import).anchor_end().case_sensitive().limit(40), ) } @@ -42,19 +42,19 @@ pub fn find_similar_imports<'a>( sema, krate, { - let mut local_query = LocalImportablesQuery::new(name_to_import.to_string()); + let mut local_query = symbol_index::Query::new(name_to_import.to_string()); local_query.limit(limit); local_query }, - ExternalImportablesQuery::new(name_to_import).limit(limit), + import_map::Query::new(name_to_import).limit(limit), ) } fn find_imports<'a>( sema: &Semantics<'a, RootDatabase>, krate: Crate, - local_query: LocalImportablesQuery, - external_query: ExternalImportablesQuery, + local_query: symbol_index::Query, + external_query: import_map::Query, ) -> impl Iterator> { let _p = profile::span("find_similar_imports"); let db = sema.db; -- cgit v1.2.3