Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/completions/item_list/trait_impl.rs')
-rw-r--r--crates/ide-completion/src/completions/item_list/trait_impl.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ide-completion/src/completions/item_list/trait_impl.rs b/crates/ide-completion/src/completions/item_list/trait_impl.rs
index c48672e80a..f9dc62562f 100644
--- a/crates/ide-completion/src/completions/item_list/trait_impl.rs
+++ b/crates/ide-completion/src/completions/item_list/trait_impl.rs
@@ -38,7 +38,7 @@ use ide_db::{
};
use syntax::{
ast::{self, edit_in_place::AttrsOwnerEdit, HasTypeBounds},
- format_smolstr, AstNode, SmolStr, SyntaxElement, SyntaxKind, TextRange, T,
+ format_smolstr, AstNode, SmolStr, SyntaxElement, SyntaxKind, TextRange, ToSmolStr, T,
};
use text_edit::TextEdit;
@@ -252,7 +252,7 @@ fn add_type_alias_impl(
type_alias: hir::TypeAlias,
impl_def: hir::Impl,
) {
- let alias_name = type_alias.name(ctx.db).unescaped().to_smol_str();
+ let alias_name = type_alias.name(ctx.db).unescaped().display(ctx.db).to_smolstr();
let label = format_smolstr!("type {alias_name} =");
@@ -314,7 +314,7 @@ fn add_const_impl(
const_: hir::Const,
impl_def: hir::Impl,
) {
- let const_name = const_.name(ctx.db).map(|n| n.to_smol_str());
+ let const_name = const_.name(ctx.db).map(|n| n.display_no_db().to_smolstr());
if let Some(const_name) = const_name {
if let Some(source) = ctx.sema.source(const_) {