Introduce NameRefContext

This commit is contained in:
Lukas Wirth 2022-05-07 13:46:43 +02:00
parent 1dc83f5a90
commit 6a045c7029
20 changed files with 145 additions and 106 deletions

View file

@ -17,7 +17,7 @@ fn snippet(ctx: &CompletionContext, cap: SnippetCap, label: &str, snippet: &str)
}
pub(crate) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) {
let can_be_stmt = match ctx.path_context {
let &can_be_stmt = match ctx.path_context() {
Some(PathCompletionCtx {
is_absolute_path: false,
qualifier: None,
@ -43,7 +43,7 @@ pub(crate) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionConte
}
pub(crate) fn complete_item_snippet(acc: &mut Completions, ctx: &CompletionContext) {
let path_kind = match ctx.path_context {
let path_kind = match ctx.path_context() {
Some(PathCompletionCtx {
is_absolute_path: false,
qualifier: None,