-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Disable automatic inlining of resource dtors and other things #2177
Comments
There was no deep reason for this. Embarrassingly, I think it was an accident. I agree it should be changed. |
One other, related, thing: right now, we always inline generic functions. I think the original plan was to having generic functions only be inlined if they were tagged |
I don't think that adds much, beyond the annoying need to specify all exported generics as |
I'm not sure. I think the goal was to make the model of what code is |
…test, r=RalfJung add test for backtrace with global allocator closes rust-lang#1996
Right now, resource destructors seem to always be inlined. This recently led to #2170 because the reachability map was incorrect. I fixed this the wrong way: by marking all resource bodies as reachable. The right fix seems to me to be not inlining resource bodies by default, but that change seemed a bit more involved. In particular, I wanted to check with @marijnh whether resources are being inlined intentionally? If so, is there a deep reason for that?
In general I'd like to be able to say that "no user-specified code is inlined unless either generic or marked #[inline]".
The text was updated successfully, but these errors were encountered: