Fix some tests
This commit is contained in:
@@ -13,7 +13,10 @@ mod builder_ext;
|
||||
use hir::{
|
||||
AsAssocItem, Documentation, HasAttrs, HirDisplay, ModuleDef, Mutability, ScopeDef, Type,
|
||||
};
|
||||
use ide_db::{helpers::SnippetCap, RootDatabase, SymbolKind};
|
||||
use ide_db::{
|
||||
helpers::{item_name, SnippetCap},
|
||||
RootDatabase, SymbolKind,
|
||||
};
|
||||
use syntax::TextRange;
|
||||
|
||||
use crate::{
|
||||
@@ -56,7 +59,7 @@ pub(crate) fn render_resolution_with_import<'a>(
|
||||
ScopeDef::ModuleDef(ModuleDef::Function(f)) => f.name(ctx.completion.db).to_string(),
|
||||
ScopeDef::ModuleDef(ModuleDef::Const(c)) => c.name(ctx.completion.db)?.to_string(),
|
||||
ScopeDef::ModuleDef(ModuleDef::TypeAlias(t)) => t.name(ctx.completion.db).to_string(),
|
||||
_ => import_edit.import.display_path().segments().last()?.to_string(),
|
||||
_ => item_name(ctx.db(), import_edit.import.item_to_display())?.to_string(),
|
||||
};
|
||||
Render::new(ctx).render_resolution(local_name, Some(import_edit), resolution).map(|mut item| {
|
||||
item.completion_kind = CompletionKind::Magic;
|
||||
|
||||
Reference in New Issue
Block a user