Skip to content

Fix a splat legacy demangling display bug - #160050

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

Fix a splat legacy demangling display bug#160050
teor2345 wants to merge 3 commits into
rust-lang:mainfrom
teor2345:splat-legacy-demangle

Conversation

@teor2345

Copy link
Copy Markdown
Contributor

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

@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

rustbot commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

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

@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

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@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
// there are arguments before the splat.
// FIXME(splat): if splatting becomes part of the type, we can remove this hack
if index > 0 {
write!(self, ",")?;

@camelid camelid Jul 29, 2026

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.

There should be a space after the comma too.

Suggested change
write!(self, ",")?;
write!(self, ", ")?;

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Spacing unfortunately depends on the pretty-printing context, so I think I'll need to modify the trait definition and implementers. But it should be less code overall, which is nice.

/// Prints comma-separated elements.
fn comma_sep<T>(&mut self, mut elems: impl Iterator<Item = T>) -> Result<(), PrintError>
where
T: Print<Self>,
{
if let Some(first) = elems.next() {
first.print(self)?;
for elem in elems {
self.write_str(", ")?;

// Identical to `PrettyPrinter::comma_sep` except there is no space after each comma.
fn comma_sep<T>(&mut self, mut elems: impl Iterator<Item = T>) -> Result<(), PrintError>
where
T: Print<Self>,
{
if let Some(first) = elems.next() {
first.print(self)?;
for elem in elems {
self.write_str(",")?;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I ended up adding a comma_sep_has_space method, refactoring the near-duplicate comma_sep methods, and adding comments where we might want to do a similar fix in future.

(We don't currently have non-mangling pretty-printing tests for splat, and that's ok, it's an incomplete feature.)

@rustbot ready

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

rustbot commented Jul 31, 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.

@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
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-gcc failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

256 LL |     #[rustc_dump_symbol_name]
257    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
258 
- error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[CRATE_HASH]::boxed::Box<fn(u32, #[splat] (fn(#[splat] ()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(#[splat] ()), i8), f64)>>>)
260   --> $DIR/splat-mangling.rs:153:5
261    |
262 LL |     #[rustc_dump_symbol_name]

274 LL |     #[rustc_dump_symbol_name]
275    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
276 
- error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[CRATE_HASH]::boxed::Box<fn(u32, (fn(#[splat] ()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(#[splat] ()), i8), f64)>>>)
278   --> $DIR/splat-mangling.rs:162:5
279    |
280 LL |     #[rustc_dump_symbol_name]

292 LL |     #[rustc_dump_symbol_name]
293    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
294 
- error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[CRATE_HASH]::boxed::Box<fn(u32, #[splat] (fn(()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(()), i8), f64)>>>)
296   --> $DIR/splat-mangling.rs:171:5
297    |
298 LL |     #[rustc_dump_symbol_name]

310 LL |     #[rustc_dump_symbol_name]
311    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
312 
- error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[CRATE_HASH]::boxed::Box<fn(u32, (fn(()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(()), i8), f64)>>>)
314   --> $DIR/splat-mangling.rs:180:5
315    |
316 LL |     #[rustc_dump_symbol_name]

Note: some mismatched output was normalized before being compared
- error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(#[splat] ()), i8), f64)>>>)
-   --> /checkout/tests/ui/splat/splat-mangling.rs:153:5
- error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(#[splat] ()), i8), f64)>>>)
-   --> /checkout/tests/ui/splat/splat-mangling.rs:162:5
- error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(()), i8), f64)>>>)
-   --> /checkout/tests/ui/splat/splat-mangling.rs:171:5
- error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(()), i8), f64)>>>)
-   --> /checkout/tests/ui/splat/splat-mangling.rs:180:5
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(#[splat] ()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(#[splat] ()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(()), i8), f64)>>>)


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args splat/splat-mangling.rs`

error in revision `default`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/splat/splat-mangling.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "-Zcodegen-backend=gcc" "--target=x86_64-unknown-linux-gnu" "--cfg" "default" "--check-cfg" "cfg(test,FALSE,default,legacy,v0)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/splat/splat-mangling.default" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "opt-level=0"
stdout: none
--- stderr -------------------------------
error: symbol-name(_RMNvCsiksvdpJ6Jnj_14splat_mangling4mainINtB0_4TypeFwThmEEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:23:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<fn(#[splat] (u8, u32))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:23:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<fn(#[splat] (u8, u32))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:23:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB2_4TypeFThmEEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:32:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<fn((u8, u32))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:32:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<fn((u8, u32))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:32:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs0_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeFwTThmEEEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:41:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<fn(#[splat] ((u8, u32),))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:41:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<fn(#[splat] ((u8, u32),))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:41:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs1_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeFTThmEEEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:50:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<fn(((u8, u32),))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:50:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<fn(((u8, u32),))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:50:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs2_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypePFwTmaEEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:59:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<*const fn(#[splat] (u32, i8))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:59:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<*const fn(#[splat] (u32, i8))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:59:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs3_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypePFTmaEEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:68:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<*const fn((u32, i8))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:68:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<*const fn((u32, i8))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:68:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs4_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeFwTmaEdEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:78:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<fn(#[splat] (u32, i8), f64)>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:78:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<fn(#[splat] (u32, i8), f64)>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:78:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs5_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeFTmaEdEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:87:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<fn((u32, i8), f64)>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:87:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<fn((u32, i8), f64)>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:87:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs6_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeOFmawTdEEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:97:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<*mut fn(u32, i8, #[splat] (f64,))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:97:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<*mut fn(u32, i8, #[splat] (f64,))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:97:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs7_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeOFmaTdEEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:106:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<*mut fn(u32, i8, (f64,))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:106:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<*mut fn(u32, i8, (f64,))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:106:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs8_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeRFmwTafjEdEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:116:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<&fn(u32, #[splat] (i8, f32, usize), f64)>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:116:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<&fn(u32, #[splat] (i8, f32, usize), f64)>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:116:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs9_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeRFmTafjEdEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:125:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<&fn(u32, (i8, f32, usize), f64)>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:125:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<&fn(u32, (i8, f32, usize), f64)>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:125:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMsa_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeQFmwudEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:134:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<&mut fn(u32, #[splat] (), f64)>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:134:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<&mut fn(u32, #[splat] (), f64)>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:134:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMsb_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeQFmudEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:143:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<&mut fn(u32, (), f64)>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:143:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<&mut fn(u32, (), f64)>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:143:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMsc_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeINtNtCsmKzDxHvwyd_5alloc5boxed3BoxFmwTFwuEuaEdEuEE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:153:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(#[splat] ()), i8), f64)>>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:153:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<alloc::boxed::Box<fn(u32, #[splat] (fn(#[splat] ()), i8), f64)>>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:153:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMsd_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeINtNtCsmKzDxHvwyd_5alloc5boxed3BoxFmTFwuEuaEdEuEE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:162:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(#[splat] ()), i8), f64)>>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:162:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<alloc::boxed::Box<fn(u32, (fn(#[splat] ()), i8), f64)>>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:162:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMse_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeINtNtCsmKzDxHvwyd_5alloc5boxed3BoxFmwTFuEuaEdEuEE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:171:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(()), i8), f64)>>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:171:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<alloc::boxed::Box<fn(u32, #[splat] (fn(()), i8), f64)>>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:171:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMsf_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeINtNtCsmKzDxHvwyd_5alloc5boxed3BoxFmTFuEuaEdEuEE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:180:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(()), i8), f64)>>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:180:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<alloc::boxed::Box<fn(u32, (fn(()), i8), f64)>>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:180:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 54 previous errors
------------------------------------------

---- [ui] tests/ui/splat/splat-mangling.rs#default stdout end ----
---- [ui] tests/ui/splat/splat-mangling.rs#v0 stdout ----
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/splat/splat-mangling.v0/splat-mangling.v0.stderr`
diff of stderr:

256 LL |     #[rustc_dump_symbol_name]
257    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
258 
- error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[CRATE_HASH]::boxed::Box<fn(u32, #[splat] (fn(#[splat] ()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(#[splat] ()), i8), f64)>>>)
260   --> $DIR/splat-mangling.rs:153:5
261    |
262 LL |     #[rustc_dump_symbol_name]

274 LL |     #[rustc_dump_symbol_name]
275    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
276 
- error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[CRATE_HASH]::boxed::Box<fn(u32, (fn(#[splat] ()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(#[splat] ()), i8), f64)>>>)
278   --> $DIR/splat-mangling.rs:162:5
279    |
280 LL |     #[rustc_dump_symbol_name]

292 LL |     #[rustc_dump_symbol_name]
293    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
294 
- error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[CRATE_HASH]::boxed::Box<fn(u32, #[splat] (fn(()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(()), i8), f64)>>>)
296   --> $DIR/splat-mangling.rs:171:5
297    |
298 LL |     #[rustc_dump_symbol_name]

310 LL |     #[rustc_dump_symbol_name]
311    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
312 
- error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[CRATE_HASH]::boxed::Box<fn(u32, (fn(()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(()), i8), f64)>>>)
314   --> $DIR/splat-mangling.rs:180:5
315    |
316 LL |     #[rustc_dump_symbol_name]

Note: some mismatched output was normalized before being compared
- error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(#[splat] ()), i8), f64)>>>)
-   --> /checkout/tests/ui/splat/splat-mangling.rs:153:5
- error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(#[splat] ()), i8), f64)>>>)
-   --> /checkout/tests/ui/splat/splat-mangling.rs:162:5
- error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(()), i8), f64)>>>)
-   --> /checkout/tests/ui/splat/splat-mangling.rs:171:5
- error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(()), i8), f64)>>>)
-   --> /checkout/tests/ui/splat/splat-mangling.rs:180:5
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(#[splat] ()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(#[splat] ()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, #[splat] (fn(()), i8), f64)>>>)
+ error: demangling(<splat_mangling[CRATE_HASH]::main::Type<alloc[4462ec5c505d9a3]::boxed::Box<fn(u32, (fn(()), i8), f64)>>>)


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args splat/splat-mangling.rs`

error in revision `v0`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/splat/splat-mangling.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "-Zcodegen-backend=gcc" "--target=x86_64-unknown-linux-gnu" "--cfg" "v0" "--check-cfg" "cfg(test,FALSE,default,legacy,v0)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/splat/splat-mangling.v0" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "opt-level=0" "-Z" "unstable-options" "-Csymbol-mangling-version=v0"
stdout: none
--- stderr -------------------------------
error: symbol-name(_RMNvCsiksvdpJ6Jnj_14splat_mangling4mainINtB0_4TypeFwThmEEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:23:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<fn(#[splat] (u8, u32))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:23:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<fn(#[splat] (u8, u32))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:23:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB2_4TypeFThmEEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:32:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<fn((u8, u32))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:32:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<splat_mangling::main::Type<fn((u8, u32))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:32:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs0_NvCsiksvdpJ6Jnj_14splat_mangling4mainINtB3_4TypeFwTThmEEEuE)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:41:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: demangling(<splat_mangling[d580343ed36ed69b]::main::Type<fn(#[splat] ((u8, u32),))>>)
##[error]  --> /checkout/tests/ui/splat/splat-mangling.rs:41:5
   |
LL |     #[rustc_dump_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

Important

For more information how to resolve CI failures of this job, visit this link.

@teor2345

teor2345 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Failed due to a 15 digit crate hash in v0 demangling, which might be a bug to fix in demangling. This failure isn't splat related, it might happen on 1/16 of PRs (or changes to this test) anyway.

Asked for advice here:
https://rust-lang.zulipchat.com/#narrow/channel/386786-rustc-codegen-gcc/topic/crate.20hash.20drops.20leading.20zeroes/with/613817866

@teor2345

Copy link
Copy Markdown
Contributor Author

This is blocked on rust-lang/rustc-demangle#94 getting merged, publishing a release, and then rustc updating to that release.

This PR can still be reviewed if someone wants, once we rebase on the rust-lang/rustc-demangle#94 version bump, CI will pass without any code changes here.

@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
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-blocked Status: Blocked on something else such as an RFC or other implementation work. 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