Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/completions/dot.rs')
| -rw-r--r-- | crates/ide-completion/src/completions/dot.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/ide-completion/src/completions/dot.rs b/crates/ide-completion/src/completions/dot.rs index 53a1c8405c..e5fdac327c 100644 --- a/crates/ide-completion/src/completions/dot.rs +++ b/crates/ide-completion/src/completions/dot.rs @@ -1,6 +1,7 @@ //! Completes references after dot (fields and method calls). use ide_db::FxHashSet; +use syntax::SmolStr; use crate::{ context::{CompletionContext, DotAccess, DotAccessKind, ExprCtx, PathCompletionCtx, Qualified}, @@ -20,8 +21,11 @@ pub(crate) fn complete_dot( // Suggest .await syntax for types that implement Future trait if receiver_ty.impls_into_future(ctx.db) { - let mut item = - CompletionItem::new(CompletionItemKind::Keyword, ctx.source_range(), "await"); + let mut item = CompletionItem::new( + CompletionItemKind::Keyword, + ctx.source_range(), + SmolStr::new_static("await"), + ); item.detail("expr.await"); item.add_to(acc, ctx.db); } |