New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
assist : generate trait from impl #15152
Conversation
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
@bors r+ |
@bors r- I've started reviewing but haven't gotten time to finish it. I'm really sorry for the silence and abrupt r- but let me have one more day to review. |
No problem, if you want to take "ownership" of a review feel free to assign yourself to such PRs (or do the initial review :^) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somewhat nitpicky, but bear with me 😅
Also, I think indent levels break when the impl in question is not a top-level item of the file. Can you add a test for that, something like the one below? You may want to use mod a {
impl S$0 {
fn foo() {}
}
} |
Whoops, didn't meant to do that |
Nice work, thanks! @bors r=Veykril,lowr |
☀️ Test successful - checks-actions |
fixes #14987 . As the name suggests this assist is used to generate traits from inherent impls while adapting the original impl to fit to the newly generated trait. I made some decisions regarding when the assist should be applicable. These are surely open to discussion. I looking forward to any feedback.