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

Don't linting as_conversions in proc macros #10911

Merged
merged 1 commit into from
Jun 12, 2023
Merged

Conversation

lochetti
Copy link
Contributor

@lochetti lochetti commented Jun 8, 2023

Don't linting as_conversions if code was generated by procedural macro.

This PR fixes #9657

I implemented the fix changing the lint code to be a LateLintPass in order to be able to use the is_from_proc_macro out of the box. If the reviwer thinks that it would be better to do the other way (implementing WithSearchPat) just let me know. I might need some help in implementing it for the ustc_ast::ast::Expr

changelog: [as_conversions] avoiding warnings in macro-generated code

@rustbot
Copy link
Collaborator

rustbot commented Jun 8, 2023

r? @Alexendoo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 8, 2023
@lochetti lochetti changed the title Don't ling as_conversions in proc macros Don't linting as_conversions in proc macros Jun 8, 2023
@Alexendoo
Copy link
Member

Thanks! Yeah a late pass sounds like the best way to do it

@bors r+

@bors
Copy link
Contributor

bors commented Jun 12, 2023

📌 Commit 55c9100 has been approved by Alexendoo

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jun 12, 2023

⌛ Testing commit 55c9100 with merge b095247...

@bors
Copy link
Contributor

bors commented Jun 12, 2023

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

1 similar comment
@bors
Copy link
Contributor

bors commented Jun 12, 2023

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

@bors bors merged commit b095247 into rust-lang:master Jun 12, 2023
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.

as_conversions triggers on derived code
4 participants