This commit is contained in:
Aleksey Kladov 2021-08-02 14:26:37 +03:00
parent 71cd67fe47
commit 8b6ea1545f

View File

@ -84,13 +84,11 @@ pub(crate) fn complete_unqualified_path(acc: &mut Completions, ctx: &CompletionC
}
ctx.process_all_names(&mut |name, res| {
if let ScopeDef::GenericParam(hir::GenericParam::LifetimeParam(_)) | ScopeDef::Label(_) =
res
{
cov_mark::hit!(unqualified_skip_lifetime_completion);
return;
}
let add_resolution = match res {
ScopeDef::GenericParam(hir::GenericParam::LifetimeParam(_)) | ScopeDef::Label(_) => {
cov_mark::hit!(unqualified_skip_lifetime_completion);
return;
}
ScopeDef::ImplSelfType(_) => {
!ctx.previous_token_is(syntax::T![impl]) && !ctx.previous_token_is(syntax::T![for])
}