Skip to content
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

Merged
merged 2 commits into from
Mar 14, 2021

Conversation

iobtl
Copy link
Contributor

@iobtl iobtl commented Mar 13, 2021

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.

@rust-highfive
Copy link

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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 13, 2021
@@ -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`
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #6232

@llogiq
Copy link
Contributor

llogiq commented Mar 13, 2021

Thank you for this improvement. I just have one question at the moment, otherwise this seems fine.

@iobtl
Copy link
Contributor Author

iobtl commented Mar 13, 2021

I see, that makes sense indeed! Thank you for the suggestion, let me try to make the changes to adhere to that standard

@llogiq
Copy link
Contributor

llogiq commented Mar 14, 2021

Thank you! @bors r+

@bors
Copy link
Contributor

bors commented Mar 14, 2021

📌 Commit 1054eb0 has been approved by llogiq

@bors
Copy link
Contributor

bors commented Mar 14, 2021

⌛ Testing commit 1054eb0 with merge 52c25e9...

@bors
Copy link
Contributor

bors commented Mar 14, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 52c25e9 to master...

@bors bors merged commit 52c25e9 into rust-lang:master Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use span_lint_and_sugg instead of span_lint in unnecessary_cast
5 participants