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

Add feature gate for rvalue-static-promotion #40441

Merged
merged 3 commits into from
Mar 19, 2017
Merged

Add feature gate for rvalue-static-promotion #40441

merged 3 commits into from
Mar 19, 2017

Conversation

tbg
Copy link
Contributor

@tbg tbg commented Mar 11, 2017

Probably needs more tests (which ones?) and there may be other things that need to be done. Also not sure whether the version that introduces the flag is really 1.15.1.

See rust-lang/rfcs#1414.

Updates #38865.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @frewsxcv (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(rvalue_static_promotion)]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this even run when I run ./x.py test src/test/run-pass --test-args rval?
I see test [run-pass] run-pass/rvalue-static-promotion.rs ... ok in the output but it would seem magical if it did. I guess it is set up to be magical because other tests do it the same way, but wonder where that magic is documented.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(I believe it's not covered in src/test/COMPILER_TEST.md, though that doc does talk about "revisions" which seems like that's what you would want, but other tests I've randomly peeked into don't seem to use that, so I see no reason for the feature to be toggled when they run)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eddyb any pointers here?


The tracking issue for this feature is: [#38865]

------------------------
Copy link
Member

@frewsxcv frewsxcv Mar 12, 2017

Choose a reason for hiding this comment

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

Not a deal-breaker, but it'd be great if there was a sentence and/or example here briefly describing the feature. There are some examples here in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@frewsxcv frewsxcv assigned nrc and unassigned frewsxcv Mar 13, 2017
@nrc
Copy link
Member

nrc commented Mar 13, 2017

r? @eddyb

@rust-highfive rust-highfive assigned eddyb and unassigned nrc Mar 13, 2017
fn main() {
let x: &'static u32 = &42; //~ error: does not live long enough
let y: &'static Option<u32> = &None; //~ error: does not live long enough
}
Copy link
Member

Choose a reason for hiding this comment

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

This file and the other one need a newline at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@eddyb
Copy link
Member

eddyb commented Mar 14, 2017

@bors r+

@bors
Copy link
Contributor

bors commented Mar 14, 2017

📌 Commit 0a762aa has been approved by eddyb

@bors
Copy link
Contributor

bors commented Mar 14, 2017

☔ The latest upstream changes (presumably #39921) made this pull request unmergeable. Please resolve the merge conflicts.

@tbg
Copy link
Contributor Author

tbg commented Mar 14, 2017

Rebased.

@eddyb
Copy link
Member

eddyb commented Mar 14, 2017

@bors r+

@bors
Copy link
Contributor

bors commented Mar 14, 2017

📌 Commit f06b049 has been approved by eddyb

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 18, 2017
Add feature gate for rvalue-static-promotion

Probably needs more tests (which ones?) and there may be other things that need to be done. Also not sure whether the version that introduces the flag is really `1.15.1`.

See rust-lang/rfcs#1414.

Updates rust-lang#38865.
arielb1 pushed a commit to arielb1/rust that referenced this pull request Mar 18, 2017
Add feature gate for rvalue-static-promotion

Probably needs more tests (which ones?) and there may be other things that need to be done. Also not sure whether the version that introduces the flag is really `1.15.1`.

See rust-lang/rfcs#1414.

Updates rust-lang#38865.
bors added a commit that referenced this pull request Mar 18, 2017
arielb1 pushed a commit to arielb1/rust that referenced this pull request Mar 19, 2017
Add feature gate for rvalue-static-promotion

Probably needs more tests (which ones?) and there may be other things that need to be done. Also not sure whether the version that introduces the flag is really `1.15.1`.

See rust-lang/rfcs#1414.

Updates rust-lang#38865.
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 19, 2017
Add feature gate for rvalue-static-promotion

Probably needs more tests (which ones?) and there may be other things that need to be done. Also not sure whether the version that introduces the flag is really `1.15.1`.

See rust-lang/rfcs#1414.

Updates rust-lang#38865.
bors added a commit that referenced this pull request Mar 19, 2017
Rollup of 13 pull requests

- Successful merges: #40441, #40445, #40562, #40564, #40583, #40588, #40589, #40590, #40603, #40611, #40621, #40646, #40648
- Failed merges:
@bors bors merged commit f06b049 into rust-lang:master Mar 19, 2017
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.

6 participants