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

Fix incorrect suggestion when clone_on_ref_ptr is triggered in macros #5951

Merged
merged 2 commits into from
Aug 25, 2020

Conversation

ThibsG
Copy link
Contributor

@ThibsG ThibsG commented Aug 24, 2020

In the lint clone_on_ref_ptr, if the span is in a macro, don't expand it for suggestion.

Fixes: #2076

changelog: none

r? @ebroto

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 24, 2020
Copy link
Member

@ebroto ebroto left a comment

Choose a reason for hiding this comment

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

Just one simplification

clippy_lints/src/methods/mod.rs Outdated Show resolved Hide resolved
@ebroto
Copy link
Member

ebroto commented Aug 25, 2020

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Aug 25, 2020

📌 Commit 370fc45 has been approved by ebroto

@bors
Copy link
Contributor

bors commented Aug 25, 2020

⌛ Testing commit 370fc45 with merge 03db367...

bors added a commit that referenced this pull request Aug 25, 2020
Fix incorrect suggestion when `clone_on_ref_ptr` is triggered in macros

In the lint `clone_on_ref_ptr`, if the `span` is in a macro, don't expand it for suggestion.

Fixes: #2076

changelog: none

r? @ebroto
@flip1995
Copy link
Member

@bors retry

@bors
Copy link
Contributor

bors commented Aug 25, 2020

⌛ Testing commit 370fc45 with merge ad7a03c...

@bors
Copy link
Contributor

bors commented Aug 25, 2020

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

@bors bors merged commit ad7a03c into rust-lang:master Aug 25, 2020
@ThibsG ThibsG deleted the FixMacroCloneOnRefPtr2076 branch August 26, 2020 07:21
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.

clone_on_ref_ptr and macros
5 participants