mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Cleanup PathCompletionContext qualifier handling
This commit is contained in:
parent
a3ad99649f
commit
33fd2d7aef
10 changed files with 89 additions and 91 deletions
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue