diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-01-14 10:30:24 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-01-14 10:30:24 +0000 |
commit | 4820a9e790c4c41c7ffe1892ec576f7fd321e788 (patch) | |
tree | ef22688ef7d1486ac4f084ead6bcb7e69d520b65 /crates/ra_ide/src/completion | |
parent | 254650ff82d2e592e992cade4c9183c326fcf974 (diff) | |
parent | 52e7f67128fdaf604e4563eb6445fdd69d42c91e (diff) |
Merge #2836
2836: Move utility functions down r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/completion')
-rw-r--r-- | crates/ra_ide/src/completion/complete_dot.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide/src/completion/complete_dot.rs b/crates/ra_ide/src/completion/complete_dot.rs index 210a685e4..9ab43644e 100644 --- a/crates/ra_ide/src/completion/complete_dot.rs +++ b/crates/ra_ide/src/completion/complete_dot.rs | |||
@@ -27,7 +27,7 @@ pub(super) fn complete_dot(acc: &mut Completions, ctx: &CompletionContext) { | |||
27 | complete_methods(acc, ctx, &receiver_ty); | 27 | complete_methods(acc, ctx, &receiver_ty); |
28 | 28 | ||
29 | // Suggest .await syntax for types that implement Future trait | 29 | // Suggest .await syntax for types that implement Future trait |
30 | if ctx.analyzer.impls_future(ctx.db, receiver_ty) { | 30 | if receiver_ty.impls_future(ctx.db) { |
31 | CompletionItem::new(CompletionKind::Keyword, ctx.source_range(), "await") | 31 | CompletionItem::new(CompletionKind::Keyword, ctx.source_range(), "await") |
32 | .detail("expr.await") | 32 | .detail("expr.await") |
33 | .insert_text("await") | 33 | .insert_text("await") |
@@ -525,6 +525,7 @@ mod tests { | |||
525 | 525 | ||
526 | //- /std/lib.rs | 526 | //- /std/lib.rs |
527 | pub mod future { | 527 | pub mod future { |
528 | #[lang = "future_trait"] | ||
528 | pub trait Future {} | 529 | pub trait Future {} |
529 | } | 530 | } |
530 | "###, CompletionKind::Keyword), | 531 | "###, CompletionKind::Keyword), |