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

Lint mem_forget if any fields are Drop #10996

Merged
merged 3 commits into from Jun 25, 2023
Merged

Conversation

Centri3
Copy link
Member

@Centri3 Centri3 commented Jun 20, 2023

Closes #9298
I think this way of doing it (needs_drop) should be fine.


changelog: Enhancement: [mem_forget]: Now lints on types with fields that implement Drop
#10996

@rustbot
Copy link
Collaborator

rustbot commented Jun 20, 2023

r? @xFrednet

(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 20, 2023
@Alexendoo
Copy link
Member

Would probably be worth moving this next to

sym::mem_forget if !arg_ty.needs_drop(cx.tcx, cx.param_env) => {
(FORGET_NON_DROP, FORGET_NON_DROP_SUMMARY)
},

@xFrednet
Copy link
Member

Super swift as always. Thank you!

King bors, would you please accept this beautiful change into the marvelous kingdom of Master Branch Land?

@bors
Copy link
Collaborator

bors commented Jun 25, 2023

📌 Commit a5ae904 has been approved by xFrednet

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jun 25, 2023

⌛ Testing commit a5ae904 with merge 5c950fb...

bors added a commit that referenced this pull request Jun 25, 2023
Lint `mem_forget` if any fields are `Drop`

Closes #9298
I think this way of doing it (`needs_drop`) should be fine.

---

changelog: Enhancement: [`mem_forget`]: Now lints on types with fields that implement `Drop`
[#10996](#10996)
@bors
Copy link
Collaborator

bors commented Jun 25, 2023

💔 Test failed - checks-action_remark_test

@xFrednet
Copy link
Member

Looks like npm has some problems fetching the remark thingy. Let's try again?

@bors retry

@bors
Copy link
Collaborator

bors commented Jun 25, 2023

⌛ Testing commit a5ae904 with merge 78e36d9...

@bors
Copy link
Collaborator

bors commented Jun 25, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet
Pushing 78e36d9 to master...

1 similar comment
@bors
Copy link
Collaborator

bors commented Jun 25, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet
Pushing 78e36d9 to master...

@bors bors merged commit 78e36d9 into rust-lang:master Jun 25, 2023
5 checks passed
@Centri3 Centri3 deleted the mem_forget branch June 25, 2023 09:54
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.

mem_forget checks if a type implements Drop
5 participants