-
Notifications
You must be signed in to change notification settings - Fork 795
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
Do not store return values in locals so that holders benefit from lifetime extension for temporaries. #3142
Do not store return values in locals so that holders benefit from lifetime extension for temporaries. #3142
Conversation
6a5e7eb
to
a60945f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, as discussed on #3140, let's move ahead with this solution. I won't merge just in case you want to play with refactoring the OkWrap
pattern into a function or struct as suggested on that thread. (I am also fine with leaving that for the future, the macro code will be simpler once we ditch the deprecated #[args]
and also I have a refactoring or two in my mind which maybe I'll get to one day.)
I'd like to limit ourselves to the fix for now as I am seeing an obvious simplification by trying to extract the ok wrapping ATM. bors r=davidhewitt |
3142: Do not store return values in locals so that holders benefit from lifetime extension for temporaries. r=davidhewitt a=adamreichold Closes #3138 Co-authored-by: Adam Reichold <[email protected]>
bors retry |
Already running a review |
Build failed: |
bors retry |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page.
|
Closes #3138