Skip to content

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
Contributor

bors commented Jun 25, 2023

📌 Commit a5ae904 has been approved by xFrednet

It is now in the queue for this repository.

@bors
Copy link
Contributor

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
Contributor

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
Contributor

bors commented Jun 25, 2023

⌛ Testing commit a5ae904 with merge 78e36d9...

@bors
Copy link
Contributor

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
Contributor

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
@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