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

add [as_underscore] lint #8934

Merged
merged 1 commit into from
Jun 3, 2022
Merged

Conversation

DevAccentor
Copy link
Contributor

closes #8847

detect usage of as _ and enforce the usage of explicit type like

fn foo(n: usize) {}
let n: u16 = 256;
foo(n as _);

will suggest to change to

fn foo(n: usize) {}
let n: u16 = 256;
foo(n as usize);

changelog: add [as_underscore] lint

@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 @Manishearth (or someone else) soon.

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 Jun 3, 2022
@Manishearth
Copy link
Member

@bors r+

pretty straightforward, thanks!

@bors
Copy link
Collaborator

bors commented Jun 3, 2022

📌 Commit 64fe4e3 has been approved by Manishearth

@bors
Copy link
Collaborator

bors commented Jun 3, 2022

⌛ Testing commit 64fe4e3 with merge ebd357e...

@bors
Copy link
Collaborator

bors commented Jun 3, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing ebd357e to master...

@bors bors merged commit ebd357e into rust-lang:master Jun 3, 2022
@bors bors mentioned this pull request Jun 3, 2022
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.

Lint for as _ casts
4 participants