Skip to content

Inline direct calls to mem::forget in the frontend #15401

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

Closed
pcwalton opened this issue Jul 4, 2014 · 2 comments · Fixed by #16509
Closed

Inline direct calls to mem::forget in the frontend #15401

pcwalton opened this issue Jul 4, 2014 · 2 comments · Fixed by #16509
Labels
A-codegen Area: Code generation I-compiletime Issue: Problems and improvements with respect to compile times. I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@pcwalton
Copy link
Contributor

pcwalton commented Jul 4, 2014

When we see a direct call to mem::forget, we should just inline it in the frontend. This has two important benefits, one obvious and one not-so-obvious: (1) it reduces compilation time; (2) it can often avoid one memcpy, because of the way mem::forget is implemented.

@huonw
Copy link
Member

huonw commented Jul 4, 2014

Also addressed by #12634.

@luqmana
Copy link
Member

luqmana commented Jul 18, 2014

Since we no longer translate intrinsics as function calls the only thing left here to just get rid of the wrapper in core::men and instead just make it a use core::intrinsics::forget.

bors added a commit that referenced this issue Aug 22, 2014
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 7, 2023
internal: Turn unresolved proc macro expansions into missing expressions

Reduces the amount of type related errors one gets when proc macro expansion is disabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation I-compiletime Issue: Problems and improvements with respect to compile times. I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants