mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Correct completions in items tests
This commit is contained in:
parent
a9a77671f2
commit
2a48b53220
5 changed files with 57 additions and 24 deletions
|
@ -36,7 +36,11 @@ pub(crate) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionConte
|
|||
}
|
||||
|
||||
pub(crate) fn complete_item_snippet(acc: &mut Completions, ctx: &CompletionContext) {
|
||||
if !ctx.expects_item() || ctx.previous_token_is(T![unsafe]) || ctx.path_qual().is_some() {
|
||||
if !ctx.expects_item()
|
||||
|| ctx.previous_token_is(T![unsafe])
|
||||
|| ctx.path_qual().is_some()
|
||||
|| ctx.has_impl_or_trait_prev_sibling()
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ctx.has_visibility_prev_sibling() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue