Skip to content

Don't suggest moving tuple structs with a significant drop to late evaluation #9610

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

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Oct 8, 2022

fixes #9608

changelog: Don't suggest moving tuple structs with a significant drop to late evaluation

@rust-highfive
Copy link

r? @Alexendoo

(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 Oct 8, 2022
@AlexTMjugador
Copy link

Thanks! I'm curious about how come this PR fixes the issue, given that the affected constructs do not have any intuitive "significant drop"? The Drop trait isn't implemented on them or any type they reference.

@Jarcho
Copy link
Contributor Author

Jarcho commented Oct 8, 2022

This is checking if the enum contains a significant drop, not just the variant being constructed. IIRC, any type which implements drop, but doesn't have the rustc_insignificant_dtor attribute is considered to be significant.

@Alexendoo
Copy link
Member

👍

@bors r+

@bors
Copy link
Contributor

bors commented Oct 10, 2022

📌 Commit 39a7d00 has been approved by Alexendoo

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Oct 10, 2022

⌛ Testing commit 39a7d00 with merge cf72565...

@bors
Copy link
Contributor

bors commented Oct 10, 2022

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

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.

or_fun_call false positive on enum variants with tuple fields
5 participants