Add arg splat experiment initial tuple impl#153697
Conversation
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
It should be better for someone on https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/On.20overloading/with/573924937 to review this, @oli-obk could you take over? |
|
Let's wait for the ongoing discussion on Zulip to figure out whether we need to have a proc macro, an AST manipulating attribute (like |
89102bf to
c784a57
Compare
c784a57 to
2d9e563
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
💔 Test for 0a45074 failed: CI. Failed job:
|
And remove redundant const fn
- const, async, and unsafe functions - const generics, complex types, and where clauses (including impl Tuple)
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors try job=dist-i586-gnu-i586-i686-musl |
This comment has been minimized.
This comment has been minimized.
|
@bors rollup=iffy reason=small perf decrease,job-sensitive test output |
This comment has been minimized.
This comment has been minimized.
|
@bors try job=dist-i586-gnu-i586-i686-musl |
This comment has been minimized.
This comment has been minimized.
|
💔 Test for 6d0547c failed: CI. Failed job:
|
|
Ok, I think this is it, but let's try a few more jobs just in case @bors try job=-musl |
This comment has been minimized.
This comment has been minimized.
|
Try builds seem good enough, the failing one has passed, and only a few less similar ones remain. Assuming it was musl causing the output differences, I've made the output a lot more flexible. @bors r=oli-obk |
This comment has been minimized.
This comment has been minimized.
|
The above failure is spurious, it is from an old try job. |
Description
View all comments
This PR is part of the argument splatting lang experiment, and FFI overloading / C++ interop project goals:
Example code using existing unstable features:
Discussion of implementation strategy:
The PR is the initial implementation of the feature:
splatincomplete feature gate#[splat]attribute on function arguments#[splat]function parameter check at THIR levelOnce this PR merges, we can add further functionality, then test it out in interop tools.
Perf Impact
We expect a 0.1% regression on 5 primary and 0.2% regression on 4 secondary benchmarks in this PR, based on this perf run.
We tried a number of different ways to improve perf. Limiting splat to the 255th or lower argument is a simple hack that gives good perf, and is good enough for an experiment.
This PR series already has significant perf wins in #155223 - 0.3% perf improvement across 45 primary benchmarks. We're spending a small amount of that perf for the new feature in this PR.
Out of Scope for this PR