-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Improve "Doesn't live long enough" error #37554
Conversation
Hmm, this doesn't look quite right. It looks like we're getting rid of the temporary value message altogether. Instead, I think we want to use the same style of fixed we used before. For example, instead of this:
Have this:
|
Though I noticed that sometimes we don't put the error on the last one. Like this example:
Still, I think with the temporary value, the fix I'm showing reads okay |
@jonathandturner I did not noticed the loss of 'temporary' in error. It's easy to fix. But I reread #36279, is it about split temporary and local variables? And was it already completed? |
@mikhail-m1 - I think that's an older error before we made the message wording better for temporaries. I think the only step left for temporaries is to switch which is primary and which is secondary. |
case with temporary variable
@jonathandturner does the most recent iteration look good to you? |
Looks good! @bors r+ rollup |
📌 Commit cfdf763 has been approved by |
Improve "Doesn't live long enough" error case with temporary variable issue #36279 part of #35233 r? @jonathandturner
case with temporary variable
issue #36279 part of #35233
r? @jonathandturner