From c2a63b97a80cb738f800da61c64e748994709c31 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 29 Mar 2021 17:46:33 +0200 Subject: Rename target_ty to self_ty --- crates/ide_assists/src/handlers/generate_default_from_new.rs | 2 +- crates/ide_assists/src/handlers/generate_is_empty_from_len.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ide_assists/src/handlers') diff --git a/crates/ide_assists/src/handlers/generate_default_from_new.rs b/crates/ide_assists/src/handlers/generate_default_from_new.rs index 81c54ba3e..dc14552d6 100644 --- a/crates/ide_assists/src/handlers/generate_default_from_new.rs +++ b/crates/ide_assists/src/handlers/generate_default_from_new.rs @@ -92,7 +92,7 @@ fn is_default_implemented(ctx: &AssistContext, impl_: &Impl) -> bool { None => return false, }; - let ty = impl_def.target_ty(db); + let ty = impl_def.self_ty(db); let krate = impl_def.module(db).krate(); let default = FamousDefs(&ctx.sema, Some(krate)).core_default_Default(); let default_trait = match default { diff --git a/crates/ide_assists/src/handlers/generate_is_empty_from_len.rs b/crates/ide_assists/src/handlers/generate_is_empty_from_len.rs index b8834d283..910010a04 100644 --- a/crates/ide_assists/src/handlers/generate_is_empty_from_len.rs +++ b/crates/ide_assists/src/handlers/generate_is_empty_from_len.rs @@ -91,7 +91,7 @@ fn get_impl_method( let scope = ctx.sema.scope(impl_.syntax()); let krate = impl_def.module(db).krate(); - let ty = impl_def.target_ty(db); + let ty = impl_def.self_ty(db); let traits_in_scope = scope.traits_in_scope(); ty.iterate_method_candidates(db, krate, &traits_in_scope, Some(fn_name), |_, func| Some(func)) } -- cgit v1.2.3