diff options
author | Lukas Wirth <[email protected]> | 2021-06-17 14:54:59 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-06-17 15:02:51 +0100 |
commit | 2ac03ef1d6536955fb53baf25b9777e2a5176837 (patch) | |
tree | bb2c358a05ded61ee043b0b2271877e5ac8ac716 /crates/ide_completion/src/completions/keyword.rs | |
parent | 2a48b532208de413e4e5d39e81c33a4644ecaa22 (diff) |
Don't complete keywords in attributes inside expressions
Diffstat (limited to 'crates/ide_completion/src/completions/keyword.rs')
-rw-r--r-- | crates/ide_completion/src/completions/keyword.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ide_completion/src/completions/keyword.rs b/crates/ide_completion/src/completions/keyword.rs index c99fdef05..07541c79c 100644 --- a/crates/ide_completion/src/completions/keyword.rs +++ b/crates/ide_completion/src/completions/keyword.rs | |||
@@ -48,6 +48,10 @@ pub(crate) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionConte | |||
48 | cov_mark::hit!(no_keyword_completion_in_record_lit); | 48 | cov_mark::hit!(no_keyword_completion_in_record_lit); |
49 | return; | 49 | return; |
50 | } | 50 | } |
51 | if ctx.attribute_under_caret.is_some() { | ||
52 | cov_mark::hit!(no_keyword_completion_in_attr_of_expr); | ||
53 | return; | ||
54 | } | ||
51 | 55 | ||
52 | // Suggest .await syntax for types that implement Future trait | 56 | // Suggest .await syntax for types that implement Future trait |
53 | if let Some(receiver) = ctx.dot_receiver() { | 57 | if let Some(receiver) = ctx.dot_receiver() { |