Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/completions/keyword.rs')
| -rw-r--r-- | crates/ide-completion/src/completions/keyword.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ide-completion/src/completions/keyword.rs b/crates/ide-completion/src/completions/keyword.rs index 93bd346846..557992d14a 100644 --- a/crates/ide-completion/src/completions/keyword.rs +++ b/crates/ide-completion/src/completions/keyword.rs @@ -125,9 +125,11 @@ pub(crate) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionConte } let (can_be_stmt, in_loop_body) = match ctx.path_context { - Some(PathCompletionCtx { is_absolute_path: false, can_be_stmt, in_loop_body, .. }) => { - (can_be_stmt, in_loop_body) - } + Some(PathCompletionCtx { + is_absolute_path: false, + kind: PathKind::Expr { in_block_expr, in_loop_body, .. }, + .. + }) => (in_block_expr, in_loop_body), _ => return, }; |