Cleanup PathCompletionContext qualifier handling

This commit is contained in:
Lukas Wirth 2022-02-02 16:01:46 +01:00
parent a3ad99649f
commit 33fd2d7aef
10 changed files with 89 additions and 91 deletions

View file

@ -5,7 +5,7 @@ use ide_db::helpers::{insert_use::ImportScope, SnippetCap};
use syntax::T;
use crate::{
context::PathCompletionContext, item::Builder, CompletionContext, CompletionItem,
context::PathCompletionCtx, item::Builder, CompletionContext, CompletionItem,
CompletionItemKind, Completions, SnippetScope,
};
@ -21,7 +21,9 @@ pub(crate) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionConte
}
let can_be_stmt = match ctx.path_context {
Some(PathCompletionContext { is_trivial_path: true, can_be_stmt, .. }) => can_be_stmt,
Some(PathCompletionCtx {
is_absolute_path: false, qualifier: None, can_be_stmt, ..
}) => can_be_stmt,
_ => return,
};