Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement optimization fuel and re-enable struct field reordering #40377
See this discussion for background.
This pull request adds two new compilation options:
It also turns field reordering back on. There is no way to test this feature without something consuming fuel. We can roll this back if we want, but then the optimization fuel bits will be dead code.
The one notable absence from this PR is a test case. I'm not sure how to do one that's worth having. The only thing I can think of to test is
Discussed in @rust-lang/compiler -- let's land this thing! It'd be nice to have some sort of tests. We talked about having a test that checks that we disabled reordering on one out of two structs (by supplying one unit of fuel). We might have to adjust the test in the future but for now it's ok.
I can't get to this tonight, it's going to have to be the morning. It will not be some morning in a month from now, it will be tomorrow morning.
On Mon, Mar 13, 2017 at 10:12 PM, bors ***@***.***> wrote:
added a commit
this pull request
Mar 14, 2017
I figured out what was happening: in
However, @arielb1's #39628 resulted in the shims in those cases (e.g. again,
The only reason it didn't break before is because such functions are rare and require unstable Rust to write - the only semi-common example I can think of is