-
Notifications
You must be signed in to change notification settings - Fork 488
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
Document rvalue promotion to 'static. #98
Conversation
src/expressions.md
Outdated
created and used instead. The lifetime of temporary values is typically the | ||
innermost enclosing statement; the tail expression of a block is considered | ||
part of the statement that encloses the block. | ||
created and used instead, if not promoted to `'static`. Promotion of an |
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.
I think we need to document a version of the "dataflow-based" behavior, because now it's an integral part of the Rust semantics.
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.
Do you think it's important enough to block this?
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.
I'll like the docs to be there eventually. Not sure, whatever @eddyb prefers.
src/expressions.md
Outdated
resulting value does not contain interior mutability or destructors. | ||
Otherwise, lifetime of temporary values is typically the innermost enclosing | ||
statement; the tail expression of a block is considered part of the statement | ||
that encloses the block |
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.
nit: missing period
Thanks! |
Stabilize rvalue promotion to 'static. Closes #38865. Documentation PR at rust-lang/reference#98.
No description provided.