Skip to content

Commit 50b427c

Browse files
committed
use crate from autoderef ty
1 parent 94e6a66 commit 50b427c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ide-assists/src/handlers/generate_delegate_methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ pub(crate) fn generate_delegate_methods(acc: &mut Assists, ctx: &AssistContext<'
6363
};
6464

6565
let sema_field_ty = ctx.sema.resolve_type(&field_ty)?;
66-
let krate = sema_field_ty.krate(ctx.db());
6766
let mut methods = vec![];
6867

6968
for ty in sema_field_ty.autoderef(ctx.db()) {
69+
let krate = ty.krate(ctx.db());
7070
ty.iterate_assoc_items(ctx.db(), krate, |item| {
7171
if let hir::AssocItem::Function(f) = item {
7272
if f.self_param(ctx.db()).is_some() && f.is_visible_from(ctx.db(), current_module) {

0 commit comments

Comments
 (0)