Generate Deref assist for generic structs#20627
Generate Deref assist for generic structs#20627phyBrackets wants to merge 1 commit intorust-lang:masterfrom
Conversation
|
It seems that |
This comment has been minimized.
This comment has been minimized.
|
Hi @phyBrackets, are you still around? |
4fdbdae to
c0b6e33
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Hi @ChayimFriedman2 @A4-Tacks Sorry for the delay, been busy with other stuffs, I've rebased the patch onto master and updated the fix, for generic structs, instead of relying on Let me know if you have any other feedback. |
c0b6e33 to
d9e1086
Compare
| } | ||
| } | ||
|
|
||
| fn has_actual_impl( |
There was a problem hiding this comment.
A much simpler and more correct approach is to list the impls by Impl::all_for_type(db, strukt.ty(db)), then filter by Impl::trait_().
There was a problem hiding this comment.
There is also no need to differentiate if the struct has generic args.
|
☔ The latest upstream changes (possibly #22049) made this pull request unmergeable. Please resolve the merge conflicts. |
Fixing issue #20574
The fix ensures the assist correctly appears for generic structs without existing
Derefimplementations while maintaining accuracy for non-generic types.