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 disallowed_macros lint #9495

Merged
merged 1 commit into from
Oct 5, 2022
Merged

Conversation

Alexendoo
Copy link
Member

@Alexendoo Alexendoo commented Sep 18, 2022

Closes #7790
Fixes #9558

clippy_utils::def_path_res already resolved macro definitions which is nice, it just needed a tweak to be able to disambiguate e.g. std::vec the module & std::vec the macro, and serde::Serialize the trait & serde::Serialize the derive macro

changelog: new lint: [disallowed_macros]
changelog: [disallowed_methods], [disallowed_types]: Fix false negative when a type/fn/macro share the same path

@rust-highfive
Copy link

r? @flip1995

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 18, 2022
@bors
Copy link
Contributor

bors commented Sep 23, 2022

☔ The latest upstream changes (presumably #9525) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented Sep 25, 2022

☔ The latest upstream changes (presumably #9535) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented Sep 29, 2022

☔ The latest upstream changes (presumably #9516) made this pull request unmergeable. Please resolve the merge conflicts.

@Alexendoo Alexendoo force-pushed the disallowed-macros branch 2 times, most recently from ce89037 to 8b12024 Compare September 30, 2022 16:51
@bors
Copy link
Contributor

bors commented Oct 2, 2022

☔ The latest upstream changes (presumably #7962) made this pull request unmergeable. Please resolve the merge conflicts.

@Jarcho
Copy link
Contributor

Jarcho commented Oct 5, 2022

Is this intentionally linting in external macros?

@Alexendoo
Copy link
Member Author

Alexendoo commented Oct 5, 2022

I wasn't sure which way to go with that, I could see an argument for either way. So for now at least I went with the behaviour of disallowed_types/disallowed_methods of also linting in external macros

@Jarcho
Copy link
Contributor

Jarcho commented Oct 5, 2022

Just making sure. Thank you.

@bors r+

@bors
Copy link
Contributor

bors commented Oct 5, 2022

📌 Commit 86c86c3 has been approved by Jarcho

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Oct 5, 2022

⌛ Testing commit 86c86c3 with merge e687bed...

@bors
Copy link
Contributor

bors commented Oct 5, 2022

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

@bors bors merged commit e687bed into rust-lang:master Oct 5, 2022
@Alexendoo Alexendoo deleted the disallowed-macros branch October 5, 2022 15:39
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.

false negative for disallowed-methods New Lint: disallowed_macro
5 participants