mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
New krate() method in Resolver.
Renamed Impl to ImplBlock.
This commit is contained in:
parent
e85ee60c42
commit
8ebb20edce
5 changed files with 49 additions and 59 deletions
|
@ -39,7 +39,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
|
|||
hir::ModuleDef::Struct(s) => {
|
||||
let ty = s.ty(ctx.db);
|
||||
let krate = ctx.module.and_then(|m| m.krate(ctx.db));
|
||||
krate.map_or((), |krate| {
|
||||
if let Some(krate) = krate {
|
||||
ty.iterate_impl_items(ctx.db, krate, |item| {
|
||||
match item {
|
||||
hir::ImplItem::Method(func) => {
|
||||
|
@ -53,7 +53,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
|
|||
}
|
||||
None::<()>
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
_ => return,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue