Rename splat to avoid stable name collisions - #159817
Conversation
|
The reflection data structures are tied exactly to the implementation 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
cc @rust-lang/rustfmt Some changes occurred in compiler/rustc_attr_parsing |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
No P-high for me! @rustbot label +beta-nominated +A-attributes +A-macros +A-resolve +C-bug +F-splat +T-compiler |
|
FWIW we only assign |
|
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 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
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" }
|
Reminder, once the PR becomes ready for a review, use |
fbab3a6 to
6adf92b
Compare
|
This should be ready for review again. The search and replace is less complicated, but making the attribute longer means there's some long lines to reformat or tidy up. Most of these are in tests that aren't in the beta branch. @rustbot ready |
This comment has been minimized.
This comment has been minimized.
|
Pretty sure that was #160049, I'll rebase tomorrow. This PR is likely to be bitrotty, because there's a lot of search and replace. |
fastmod --fixed-strings '#[splat]' '#[rustc_splat]'
fastmod --fixed-strings '`splat` attribute' '`rustc_splat` attribute'
fastmod --fixed-strings '$splat$' '$rustc_splat$'
fastmod 'v0(.*)#\[rustc_splat\]' 'v0${1}#[splat]' tests/ui/splat/splat-mangling.rs
6adf92b to
bc1bb27
Compare
|
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. |
Tracking issue: #153629
This PR renames
#[splat]to#[rustc_splat], in a mostly automated way (usingfastmod).The rename commands I used were:
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-betabranch.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