Skip to content

Fix a splat legacy demangling display bug - #160050

Open
teor2345 wants to merge 4 commits into
rust-lang:mainfrom
teor2345:splat-legacy-demangle
Open

teor2345 wants to merge 4 commits into
rust-lang:mainfrom
teor2345:splat-legacy-demangle

Conversation

@teor2345

@teor2345 teor2345 commented Jul 28, 2026 •

Copy link
Copy Markdown
Member

View all comments

Tracking issue: #153629

This PR fixes a splat legacy demangling display bug, where the comma is in the wrong place in the argument list.

It also does a cleanup from @folkertdev's PR #159643 review:

@rustbot label +F-splat +C-bug +A-name-mangling

Edit: this PR now accepts 8-16 character crate hashes in normalisation regexes, so it no longer depends on rust-lang/rustc-demangle#94 being reviewed, merged, and updated in rustc's deps

Edit 2: this PR only fixes legacy demangling. The v0 splat attribute name is not changed here, because it requires rust-lang/rustc-demangle#93 to be reviewed and merged, a rustc-demangle release, and a version bump in rust-lang/rust to fix. That seems to be better done in another PR.

@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. labels Jul 28, 2026
@rustbot

rustbot commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

r? @camelid

rustbot has assigned @camelid.
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 74 candidates
  • Random selection from 19 candidates

@rustbot rustbot added A-name-mangling Area: Name mangling / decoration aka symbol mangling C-bug Category: This is a bug. F-splat `#![feature(splat)]` https://github.com/rust-lang/rust/issues/153629 labels Jul 28, 2026
Comment thread compiler/rustc_middle/src/ty/print/pretty.rs Outdated
@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 28, 2026
@rustbot

This comment was marked as resolved.

@teor2345
teor2345 force-pushed the splat-legacy-demangle branch from c82af0a to 980ae5d Compare July 29, 2026 01:15
@rustbot

This comment has been minimized.

@teor2345

This comment was marked as outdated.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 29, 2026
@rust-log-analyzer

This comment has been minimized.

@teor2345
teor2345 force-pushed the splat-legacy-demangle branch from 980ae5d to 1099c87 Compare July 29, 2026 05:42
Comment thread compiler/rustc_middle/src/ty/print/pretty.rs Outdated
Comment thread compiler/rustc_middle/src/ty/print/pretty.rs Outdated
@camelid camelid 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 29, 2026
@teor2345
teor2345 force-pushed the splat-legacy-demangle branch from 1099c87 to 149a65c Compare July 30, 2026 00:52
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 30, 2026
@teor2345
teor2345 force-pushed the splat-legacy-demangle branch from 149a65c to 9f6099c Compare July 31, 2026 03:28
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@teor2345
teor2345 force-pushed the splat-legacy-demangle branch from 8db7925 to 511d292 Compare July 31, 2026 05:30
@teor2345

This comment was marked as resolved.

@camelid camelid added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 31, 2026
@teor2345

Copy link
Copy Markdown
Member Author

It looks like we're stalled on the rustc-demangle side here, so I might redesign these tests so they're not blocked on it.

@rustbot

This comment was marked as resolved.

@teor2345
teor2345 force-pushed the splat-legacy-demangle branch from 2a26add to 707e045 Compare September 3, 2026 19:26
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@teor2345
teor2345 force-pushed the splat-legacy-demangle branch from 707e045 to e578f5c Compare September 3, 2026 20:13
@rust-log-analyzer

This comment has been minimized.

@teor2345
teor2345 force-pushed the splat-legacy-demangle branch from e578f5c to 2a313d7 Compare September 3, 2026 20:56
@teor2345

teor2345 commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

@rustbot ready

I changed this PR to accept 8-16 character crate hashes in normalisation regexes, so it no longer depends on rust-lang/rustc-demangle#94 being reviewed, merged, and updated in rustc's deps. This is consistent with the normalisation approach taken in the UI test framework.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Sep 4, 2026
@rust-bors

This comment was marked as resolved.

@camelid camelid 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.

Sorry for my delay with this. Looks good except for the splat/rustc_splat inconsistency (and the merge conflicts).

View changes since this review

Comment thread tests/ui/splat/splat-mangling.rs Outdated
Comment on lines +100 to +104
//[legacy]~| ERROR demangling(splat_mangling::main::Type<*mut fn(u32,i8,#[rustc_splat] (f64,))>::
//[legacy]~| ERROR demangling-alt(splat_mangling::main::Type<*mut fn(u32,i8,#[rustc_splat] (f64,))>)
//[v0,default]~^^^^ ERROR symbol-name(_RMs6_NvCsCRATE_HASH_14splat_mangling4mainINtB<REF>_4TypeOFmawTdEEuE)
//[v0,default]~| ERROR demangling(<splat_mangling[
//[v0,default]~| ERROR demangling-alt(<splat_mangling::main::Type<*mut fn(u32, i8, #[splat] (f64,))>>)

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.

Is it intentional that legacy mangling says #[rustc_splat] but v0 says #[splat]? It seems like v0 is wrong.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

v0 is not fixed, but also out of scope for this PR. v0 requires rust-lang/rustc-demangle#93 to be reviewed and merged, a rustc-demangle release, and a version bump in rust-lang/rust to fix.

So I think it's best that they're fixed separately.

I'll do a rebase right now.

@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 Sep 24, 2026
@teor2345
teor2345 force-pushed the splat-legacy-demangle branch from 2a313d7 to 2fb58b9 Compare September 25, 2026 07:01
@rustbot

rustbot commented Sep 25, 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.

@teor2345

Copy link
Copy Markdown
Member Author

Just a change from ERROR to NOTE on some log lines

@rustbot ready

@rustbot

This comment was marked as resolved.

@teor2345 teor2345 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 25, 2026

This branch has not been deployed

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

Labels

A-name-mangling Area: Name mangling / decoration aka symbol mangling C-bug Category: This is a bug. F-splat `#![feature(splat)]` https://github.com/rust-lang/rust/issues/153629 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants