Skip to content

Rename splat to avoid stable name collisions - #159817

Merged
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
teor2345:splat-rename-nightly
Jul 30, 2026
Merged

Rename splat to avoid stable name collisions#159817
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
teor2345:splat-rename-nightly

Conversation

@teor2345

@teor2345 teor2345 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

View all comments

Tracking issue: #153629

This PR renames #[splat] to #[rustc_splat], in a mostly automated way (using fastmod).

The rename commands I used were:

fastmod --fixed-strings '#[splat]' '#[rustc_splat]'
fastmod --fixed-strings '`splat` attribute' '`rustc_splat` attribute'
# I'm pretty sure the symbol demangling commands are no-ops on beta
# Legacy symbol demangling
fastmod --fixed-strings '$splat$' '$rustc_splat$'
# Revert some changes that aren't in rustc_demangle yet
fastmod 'v0(.*)#\[rustc_splat\]' 'v0${1}#[splat]' tests/ui/splat/splat-mangling.rs

Part of #159428

Backport Advice

Cherry-pick the first commit to the beta branch, then run the fastmod commands above.
I've tested this locally (with a slightly different name), and it works, see my splat-rename-beta branch.

Remaining Work

rustc_demangle needs an update to the attribute name, a release, and then a version bump in rust-lang/rust. I'll do that separately. It doesn't need to be backported, because the last version bump was after beta branched.

There's also some external code that needs updates, the full list is in the ticket: #159428 (comment)

@rustbot label +beta-nominated +A-attributes +A-macros +A-resolve +C-bug +F-splat +P-high +T-compiler

@rustbot

rustbot commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

The reflection data structures are tied exactly to the implementation
in the compiler. Make sure to also adjust rustc_const_eval/src/const_eval/type_info.rs

cc @oli-obk

This PR changes rustc_public

cc @oli-obk, @celinval, @ouz-a, @makai410

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann, @JonathanBrouwer

rustfmt is developed in its own repository. If possible, consider making this change to rust-lang/rustfmt instead.

cc @rust-lang/rustfmt

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Jul 24, 2026
@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. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Jul 24, 2026
@rustbot

This comment was marked as outdated.

@rustbot

This comment was marked as outdated.

@teor2345

Copy link
Copy Markdown
Contributor Author

No P-high for me!

@rustbot label +beta-nominated +A-attributes +A-macros +A-resolve +C-bug +F-splat +T-compiler

@rustbot rustbot added A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-resolve Area: Name/path resolution done by `rustc_resolve` specifically beta-nominated Nominated for backporting to the compiler in the beta channel. C-bug Category: This is a bug. F-splat `#![feature(splat)]` https://github.com/rust-lang/rust/issues/153629 labels Jul 24, 2026
@teor2345 teor2345 changed the title Splat rename nightly Rename splat to avoid stable name collisions Jul 24, 2026
@teor2345
teor2345 marked this pull request as draft July 24, 2026 07:13
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 24, 2026
@jieyouxu

Copy link
Copy Markdown
Member

FWIW we only assign P-* for issues not PRs; I'm happy to review the rename.
r? me

@rustbot rustbot assigned jieyouxu and unassigned fee1-dead Jul 24, 2026
@apiraino

Copy link
Copy Markdown
Contributor

I will "de-nominate" from backport as now it's a bit too early. Feel free to nominate again when the PR is reviewed and approved :)

@rustbot label -beta-nominated

@rustbot rustbot removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 24, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@ytmimi ytmimi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please restore src/tools/rustfmt/tests/source/reorder_modules/ZYXW/mod.rs, src/tools/rustfmt/tests/source/reorder_modules/ZYXW/mod.rs, src/tools/rustfmt/tests/target/reorder_modules/ABCD/mod.rs, src/tools/rustfmt/tests/target/reorder_modules/ZYXW/mod.rs

Removing these files is causing rustfmt test failures:

  thread '<unnamed>' (54612) panicked at src/tools/rustfmt/src/test/mod.rs:842:40:
  called `Result::unwrap()` on an `Err` value: ModuleResolutionError(ModuleResolutionError { module: "ZYXW", kind: NotFound { file: "tests/target/reorder_modules/ZYXW.rs" }

View changes since this review

@rustbot

rustbot commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@teor2345
teor2345 force-pushed the splat-rename-nightly branch from 6adf92b to bc1bb27 Compare July 30, 2026 01:00
@rustbot

rustbot commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

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.

@jieyouxu jieyouxu removed the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Jul 30, 2026

@jieyouxu jieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, I did some grepping and didn't notice any stragglers modulo rustc_demangle case, as you mentioned.

(Also thanks for making it easy to review by breaking it into commits)

@bors r+ rollup=never p=1 (beta-backport)

View changes since this review

@rust-bors

rust-bors Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

📌 Commit bc1bb27 has been approved by jieyouxu

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 30, 2026
@jieyouxu jieyouxu removed the C-bug Category: This is a bug. label Jul 30, 2026
@jieyouxu

Copy link
Copy Markdown
Member

@bors rollup=iffy (can be slightly conflict-prone)

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 30, 2026
…ieyouxu

Rename splat to avoid stable name collisions

Tracking issue: rust-lang#153629

This PR renames `#[splat]` to `#[rustc_splat]`, in a mostly automated way (using `fastmod`).

The rename commands I used were:
```sh
fastmod --fixed-strings '#[splat]' '#[rustc_splat]'
fastmod --fixed-strings '`splat` attribute' '`rustc_splat` attribute'
# I'm pretty sure the symbol demangling commands are no-ops on beta
# Legacy symbol demangling
fastmod --fixed-strings '$splat$' '$rustc_splat$'
# Revert some changes that aren't in rustc_demangle yet
fastmod 'v0(.*)#\[rustc_splat\]' 'v0${1}#[splat]' tests/ui/splat/splat-mangling.rs
```

Part of rust-lang#159428

#### Backport Advice

Cherry-pick the first commit to the beta branch, then run the fastmod commands above.
I've tested this locally (with a slightly different name), and it works, see my [`splat-rename-beta` branch](https://github.com/teor2345/rust/tree/splat-rename-beta).

#### Remaining Work

rustc_demangle needs an update to the attribute name, a release, and then a version bump in rust-lang/rust. I'll do that separately. It doesn't need to be backported, because the last version bump was after beta branched.

There's also some external code that needs updates, the full list is in the ticket: rust-lang#159428 (comment)

@rustbot label +beta-nominated +A-attributes +A-macros +A-resolve +C-bug +F-splat +P-high +T-compiler
rust-bors Bot pushed a commit that referenced this pull request Jul 30, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #159817 (Rename splat to avoid stable name collisions)
 - #158057 (Don't escape U+FF9E and U+FF9F in `escape_debug_ext`)
 - #159818 (Resolve vars before calling `unnormalized_obligations`)
 - #160040 (Split function parsing out of `item.rs` to a new module.)
 - #160044 (Add regression tests for fixed dead-code issues)
 - #160147 (tests: Remove `-Zthreads` options from tests in `ui/parallel-rustc`)
 - #160175 (Try to recover less from incorrectly parsed const arg)
 - #160181 (Mark `Tuple` and `FnPtr` traits `#[fundamental]`)
@rustbot

rustbot commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

beta backport approved as per compiler team on Zulip. A backport PR will be authored by the release team at the end of the current development cycle. Backport labels are handled by them.

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jul 30, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 30, 2026
…ieyouxu

Rename splat to avoid stable name collisions

Tracking issue: rust-lang#153629

This PR renames `#[splat]` to `#[rustc_splat]`, in a mostly automated way (using `fastmod`).

The rename commands I used were:
```sh
fastmod --fixed-strings '#[splat]' '#[rustc_splat]'
fastmod --fixed-strings '`splat` attribute' '`rustc_splat` attribute'
# I'm pretty sure the symbol demangling commands are no-ops on beta
# Legacy symbol demangling
fastmod --fixed-strings '$splat$' '$rustc_splat$'
# Revert some changes that aren't in rustc_demangle yet
fastmod 'v0(.*)#\[rustc_splat\]' 'v0${1}#[splat]' tests/ui/splat/splat-mangling.rs
```

Part of rust-lang#159428

#### Backport Advice

Cherry-pick the first commit to the beta branch, then run the fastmod commands above.
I've tested this locally (with a slightly different name), and it works, see my [`splat-rename-beta` branch](https://github.com/teor2345/rust/tree/splat-rename-beta).

#### Remaining Work

rustc_demangle needs an update to the attribute name, a release, and then a version bump in rust-lang/rust. I'll do that separately. It doesn't need to be backported, because the last version bump was after beta branched.

There's also some external code that needs updates, the full list is in the ticket: rust-lang#159428 (comment)

@rustbot label +beta-nominated +A-attributes +A-macros +A-resolve +C-bug +F-splat +P-high +T-compiler
rust-bors Bot pushed a commit that referenced this pull request Jul 30, 2026
Rollup of 14 pull requests

Successful merges:

 - #159817 (Rename splat to avoid stable name collisions)
 - #160204 (Sync from portable simd 2026 07 30)
 - #150885 (Revive L4Re target)
 - #158057 (Don't escape U+FF9E and U+FF9F in `escape_debug_ext`)
 - #160125 (Fix typing mode handling in transmute checks and rustc_dump_layout)
 - #160152 (Create on-demand CI job for testing EC2 instances)
 - #159214 (std: improve the documentation of the random feature)
 - #159818 (Resolve vars before calling `unnormalized_obligations`)
 - #160040 (Split function parsing out of `item.rs` to a new module.)
 - #160044 (Add regression tests for fixed dead-code issues)
 - #160144 (renovate: group lockfiles PRs)
 - #160149 (Fix Windows on Arm PAC default)
 - #160175 (Try to recover less from incorrectly parsed const arg)
 - #160181 (Mark `Tuple` and `FnPtr` traits `#[fundamental]`)
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 30, 2026
@rust-bors

rust-bors Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jieyouxu
Duration: 3h 16m 17s
Pushing 8ab9fdf to main...

@rust-bors
rust-bors Bot merged commit 8ab9fdf into rust-lang:main Jul 30, 2026
14 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing be3d26d (parent) -> 8ab9fdf (this PR)

Test differences

Show 2 test diffs

2 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 8ab9fdff5a91b9f2b5ed57fb0275452d9a0d0280 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-rust-for-linux: 31m 15s -> 51m 22s (+64.4%)
  2. x86_64-mingw-1: 1h 45m -> 2h 50m (+61.8%)
  3. x86_64-gnu-gcc-core-tests: 8m 19s -> 12m 14s (+47.2%)
  4. i686-gnu-nopt-2: 1h 37m -> 2h 12m (+35.2%)
  5. dist-x86_64-msvc-alt: 2h 7m -> 2h 52m (+35.2%)
  6. arm-android: 1h 15m -> 1h 41m (+35.0%)
  7. i686-gnu-2: 1h 11m -> 1h 36m (+34.5%)
  8. dist-powerpc-linux: 1h 12m -> 1h 33m (+28.5%)
  9. dist-loongarch64-linux: 1h 26m -> 1h 51m (+28.4%)
  10. dist-powerpc64-linux-gnu: 1h 15m -> 1h 35m (+27.3%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8ab9fdf): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.2%] 3
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.4%, secondary 0.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.8% [0.4%, 3.1%] 2
Regressions ❌
(secondary)
0.5% [0.4%, 0.6%] 9
Improvements ✅
(primary)
-0.5% [-0.5%, -0.4%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [-0.5%, 3.1%] 5

Cycles

Results (primary -0.0%, secondary -2.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.7% [0.6%, 0.8%] 4
Regressions ❌
(secondary)
2.3% [0.7%, 4.4%] 8
Improvements ✅
(primary)
-1.0% [-1.4%, -0.7%] 3
Improvements ✅
(secondary)
-9.7% [-18.8%, -0.4%] 5
All ❌✅ (primary) -0.0% [-1.4%, 0.8%] 7

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 489.155s -> 492.09s (0.60%)
Artifact size: 390.64 MiB -> 390.63 MiB (-0.00%)

@teor2345

Copy link
Copy Markdown
Contributor Author

This is a pure rename, I think the benchmark changes are noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-resolve Area: Name/path resolution done by `rustc_resolve` specifically beta-accepted Accepted for backporting to the compiler in the beta channel. beta-nominated Nominated for backporting to the compiler in the beta channel. F-splat `#![feature(splat)]` https://github.com/rust-lang/rust/issues/153629 merged-by-bors This PR was explicitly merged by bors. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants