mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-25 05:14:27 +00:00
simplify
This commit is contained in:
parent
71cd67fe47
commit
8b6ea1545f
@ -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])
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user