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

Avoid adding drops for types w/ no dtor in MIR construction #28159

Closed
nikomatsakis opened this issue Sep 1, 2015 · 0 comments
Closed

Avoid adding drops for types w/ no dtor in MIR construction #28159

nikomatsakis opened this issue Sep 1, 2015 · 0 comments
Labels
A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html

Comments

@nikomatsakis
Copy link
Contributor

The MIR code currently adds drops for all types that are not Copy, even if we can see that there is no destructor (e.g., struct Foo(u32)). This is relatively harmless (trans ignores such types) but it means more memory alloc etc than necessary. See associated FIXME.

@steveklabnik steveklabnik added the A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html label Sep 3, 2015
wesleywiser added a commit to wesleywiser/rust that referenced this issue Dec 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
Projects
None yet
Development

No branches or pull requests

2 participants