Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/completions/extern_abi.rs')
-rw-r--r--crates/ide-completion/src/completions/extern_abi.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ide-completion/src/completions/extern_abi.rs b/crates/ide-completion/src/completions/extern_abi.rs
index e411c1c869..75017cf66f 100644
--- a/crates/ide-completion/src/completions/extern_abi.rs
+++ b/crates/ide-completion/src/completions/extern_abi.rs
@@ -1,7 +1,7 @@
//! Completes function abi strings.
use syntax::{
ast::{self, IsString},
- AstNode, AstToken,
+ AstNode, AstToken, SmolStr,
};
use crate::{
@@ -53,7 +53,8 @@ pub(crate) fn complete_extern_abi(
let abi_str = expanded;
let source_range = abi_str.text_range_between_quotes()?;
for &abi in SUPPORTED_CALLING_CONVENTIONS {
- CompletionItem::new(CompletionItemKind::Keyword, source_range, abi).add_to(acc, ctx.db);
+ CompletionItem::new(CompletionItemKind::Keyword, source_range, SmolStr::new_static(abi))
+ .add_to(acc, ctx.db);
}
Some(())
}