-
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
replace span_lint with span_lint_and_sugg along with error message #6895
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @llogiq (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. |
tests/ui/unnecessary_cast.stderr
Outdated
@@ -2,21 +2,21 @@ error: casting to the same type is unnecessary (`i32` -> `i32`) | |||
--> $DIR/unnecessary_cast.rs:6:5 | |||
| | |||
LL | 1i32 as i32; | |||
| ^^^^^^^^^^^ | |||
| ^^^^^^^^^^^ help: try: `1i32` |
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.
Wouldn't we usually suggest 1_i32
for better legibility?
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.
See #6232
Thank you for this improvement. I just have one question at the moment, otherwise this seems fine. |
I see, that makes sense indeed! Thank you for the suggestion, let me try to make the changes to adhere to that standard |
Thank you! @bors r+ |
📌 Commit 1054eb0 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
fixes: #6874
changelog: none
apologies if this may not be the most idiomatic way of doing it, any advice on changes (if any) would be greatly appreciated.