-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
#[inline] is no longer accepted on closures #49632
Comments
While I think this should be fixed, this is not exactly a regression, since |
I can make a change, since I wrote that original patch. I'm curious if a better change would be to have closures always inlined? That seems like it might have been the expected behavior and the reason why it was suggested to me to write the check like this in the first place? |
I believe closures are currently always effectively |
I would just change the |
Allow #[inline] on closures Fixes rust-lang#49632
Since #49291
#[inline]
is no longer accepted on closures, despite the fact that this attribute does have an effect on code generation.The generated LLVM IR (in debug builds) for this example is different if you remove
#[inline(always)]
:The text was updated successfully, but these errors were encountered: