diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-30 17:45:05 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-30 17:45:05 +0100 |
commit | fd7c454d516e3af90d8c0d0d8a22655345fec2d7 (patch) | |
tree | 6e5292a731c7039d92c636bc66a27714845ffb1c /crates/ide/src/references/rename.rs | |
parent | 277db63a08d9910ffbcf1eded723c176941feff1 (diff) | |
parent | b4bb7743810b1e6ac8b897a465c430e9ed8d5c44 (diff) |
Merge #8186
8186: Lower traits to `TraitRef` instead of `TypeRef` r=matklad a=Veykril
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/ide/src/references/rename.rs')
-rw-r--r-- | crates/ide/src/references/rename.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/references/rename.rs b/crates/ide/src/references/rename.rs index 26d6dc9c9..98456967a 100644 --- a/crates/ide/src/references/rename.rs +++ b/crates/ide/src/references/rename.rs | |||
@@ -307,7 +307,7 @@ fn rename_to_self(sema: &Semantics<RootDatabase>, local: hir::Local) -> RenameRe | |||
307 | hir::AssocItemContainer::Impl(impl_) => impl_, | 307 | hir::AssocItemContainer::Impl(impl_) => impl_, |
308 | }; | 308 | }; |
309 | let first_param_ty = first_param.ty(); | 309 | let first_param_ty = first_param.ty(); |
310 | let impl_ty = impl_.target_ty(sema.db); | 310 | let impl_ty = impl_.self_ty(sema.db); |
311 | let (ty, self_param) = if impl_ty.remove_ref().is_some() { | 311 | let (ty, self_param) = if impl_ty.remove_ref().is_some() { |
312 | // if the impl is a ref to the type we can just match the `&T` with self directly | 312 | // if the impl is a ref to the type we can just match the `&T` with self directly |
313 | (first_param_ty.clone(), "self") | 313 | (first_param_ty.clone(), "self") |