-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Removing RHS snippet from SHADOW_UNRELATED message. #5788
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @yaahc (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
r? @flip1995 |
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.
I'm not sure if we need this. Especially for the shadow_unrelated
lint, I don't think the span of the expression that is assigned to the shadowing binding doesn't help at all, IMO. So removing this snippet would be the better solution in this case.
If multi-line snippets are involved there almost always is a possibility to add a hint/note/suggestion through the rustc diag interface, which truncates multi-line snippets automatically.
Thanks for the review, @flip1995! Sorry I took so long to get back to this PR, but I've finally made the changes you suggested. Much easier than what I had initially thought was needed. 😄 |
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.
Can you rebase onto master, to get rid of the merge commits. Otherwise this is good to go.
Rebase done, but I'm not quite sure why that check failed. 🤔 |
That failure is unrelated, don't worry about it. |
@bors r+ Thanks! |
📌 Commit a064045 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Fixes #5703
I am not sure if I reinvented the wheel here, but I could not really find a snippet function that did this truncation, so I created the function. Please tell me if there was a more obvious way to do this, I am new here. 😄
changelog: Truncates multi-line RHS in shadow_unrelated message if it has more than 5 lines.