Skip to content

Add arg splat experiment feature gate and stub#153697

Open
teor2345 wants to merge 1 commit intorust-lang:mainfrom
teor2345:fn-arg-splat-experiment
Open

Add arg splat experiment feature gate and stub#153697
teor2345 wants to merge 1 commit intorust-lang:mainfrom
teor2345:fn-arg-splat-experiment

Conversation

@teor2345
Copy link
Contributor

This PR is part of the argument splatting lang experiment, and FFI overloading / C++ interop project goals:

The PR only contains the initial stubs for the feature:

  • splat incomplete feature gate
    • feature gate UI test
  • #[splat] proc macro stub which passes through its tokens (for now)
    • exported into a splat module in core & std
  • #[splat] function item check
    • the cloning of the item kind will go away when the items are modified by the macro
    • UI test for item type filtering

Once this PR merges, we can start adding basic macro functionality, and testing it out in interop tools.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 11, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2026

r? @JohnTitor

rustbot has assigned @JohnTitor.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 16 candidates

@rust-log-analyzer
Copy link
Collaborator

The job tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[TIMING:end] tool::Tidy { compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false }, target: x86_64-unknown-linux-gnu } -- 0.000
fmt check
fmt: checked 6742 files
tidy check
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/splat` exists in the filesystem but is not documented in `tests/ui/README.md`
tidy [ui_tests (tests)]: `tests/ui/README.md` subdirectory listing is out of sync with the filesystem. Please add or remove subdirectory entries (## headers with backtick-wrapped names) to match the actual directories in `tests/ui/`
tidy [ui_tests (tests)]: FAIL
tidy [rustdoc_json (src)]: `rustdoc-json-types` modified, checking format version
tidy: Skipping binary file check, read-only filesystem
tidy [style (compiler)]: /checkout/compiler/rustc_builtin_macros/src/splat.rs:12: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
tidy [style (compiler)]: /checkout/compiler/rustc_builtin_macros/src/splat.rs:46: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
tidy [style (compiler)]: /checkout/compiler/rustc_builtin_macros/src/splat.rs:52: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
tidy [style (library)]: /checkout/library/core/src/macros/mod.rs:1919: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
tidy [style (compiler)]: FAIL
tidy [style (library)]: FAIL
tidy [style (tests)]: /checkout/tests/ui/splat/splat-non-function.rs:41: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
tidy [style (tests)]: FAIL
removing old virtual environment
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'venv'
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'virtualenv'
Requirement already satisfied: pip in ./build/venv/lib/python3.10/site-packages (26.0.1)
linting python files
---
linting javascript files
Running eslint on rustdoc JS files
info: ES-Check: there were no ES version matching errors!  🎉
typechecking javascript files
tidy: The following checks failed: style (compiler), style (library), style (tests), ui_tests (tests)
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/rust-tidy --root-path=/checkout --cargo-path=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo --output-dir=/checkout/obj/build --concurrency=4 --npm-path=/node/bin/yarn --ci=true --extra-checks=py,cpp,js,spellcheck` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1612:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:1387:29

Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Build completed unsuccessfully in 0:02:57
  local time: Wed Mar 11 08:30:01 UTC 2026
  network time: Wed, 11 Mar 2026 08:30:01 GMT
##[error]Process completed with exit code 1.

use crate::util::{check_builtin_macro_attribute, warn_on_duplicate_attribute};

/// Expand a function taking a tuple, into a function taking separate arguments.
/// TODO: not yet implemented, currently passes the input through unchanged, after checking it's a function.
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to use FIXME(splat) instead of TODO so that tidy passes

@JohnTitor
Copy link
Member

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?

@oli-obk oli-obk assigned oli-obk and unassigned JohnTitor Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants