Skip to content
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

Merged
merged 1 commit into from
Aug 16, 2017

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Aug 13, 2017

No description provided.

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
Copy link
Contributor

@arielb1 arielb1 Aug 13, 2017

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.

Copy link
Member

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?

Copy link
Contributor

@arielb1 arielb1 Aug 15, 2017

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.

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: missing period

@steveklabnik steveklabnik merged commit 266d429 into rust-lang:master Aug 16, 2017
@steveklabnik
Copy link
Member

Thanks!

@eddyb eddyb deleted the patch-1 branch August 16, 2017 16:46
bors added a commit to rust-lang/rust that referenced this pull request Aug 16, 2017
Stabilize rvalue promotion to 'static.

Closes #38865.

Documentation PR at rust-lang/reference#98.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants