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

trivially_copy_pass_by_ref fixes #8639

Merged
merged 2 commits into from
Jun 28, 2022

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Apr 6, 2022

fixes #5953
fixes #2961

The fix for #5953 is overly aggressive, but the suggestion is so bad that it's worth the false negatives. Basically three things together:

  • It's not obviously wrong
  • It compiles
  • It may actually work when tested

changelog: Don't lint trivially_copy_pass_by_ref when unsafe pointers are used.
changelog: Better track lifetimes when linting trivially_copy_pass_by_ref.

@rust-highfive
Copy link

r? @camsteffen

(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 Apr 6, 2022
@bors
Copy link
Contributor

bors commented May 9, 2022

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

@dswij
Copy link
Member

dswij commented Jun 23, 2022

r? @dswij

@rust-highfive rust-highfive assigned dswij and unassigned camsteffen Jun 23, 2022
Copy link
Member

@dswij dswij left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for this!

There's some conflicts that needs to be resolved, and after that I think this is good to merge

@Jarcho Jarcho force-pushed the trivially_copy_pass_by_ref_5953 branch from 5103fbe to c10101c Compare June 27, 2022 17:14
@dswij
Copy link
Member

dswij commented Jun 28, 2022

Thanks! @bors r+

@bors
Copy link
Contributor

bors commented Jun 28, 2022

📌 Commit c10101c has been approved by dswij

@bors
Copy link
Contributor

bors commented Jun 28, 2022

⌛ Testing commit c10101c with merge 373bb57...

@bors
Copy link
Contributor

bors commented Jun 28, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: dswij
Pushing 373bb57 to master...

@bors bors merged commit 373bb57 into rust-lang:master Jun 28, 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.

trivially_copy_pass_by_ref does not consider pointers False positive with trivially_copy_pass_by_ref
5 participants