Skip to content

Bump rustc-demangle to 0.1.28#159202

Merged
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
teor2345:bump-rustc-demangle
Jul 13, 2026
Merged

Bump rustc-demangle to 0.1.28#159202
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
teor2345:bump-rustc-demangle

Conversation

@teor2345

@teor2345 teor2345 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

This PR is part of the splat lang experiment: #153629

It brings in the changes from rust-lang/rustc-demangle#90, which encode splatted types with a w prefix in type mangling. This is required to fix the symbol clashes in #158644.

We need to upgrade the compiler and standard library to avoid "can't demangle" panics or errors. Some tools might work without the upgrade, but we might as well do it there as well.

@rustbot label +C-enhancement +F-splat +T-compiler +A-name-mangling

@rustbot

rustbot commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

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

cc @Amanieu, @folkertdev, @sayantn

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

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

cc @rust-lang/clippy

These commits modify the library/Cargo.lock file. Unintentional changes to library/Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. 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 Jul 13, 2026
@rustbot

rustbot commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

r? @jhpratt

rustbot has assigned @jhpratt.
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: libs
  • libs expanded to 12 candidates
  • Random selection from Darksonn, JohnTitor, Mark-Simulacrum, clarfonthey, jhpratt

@rustbot rustbot added A-name-mangling Area: Name mangling / decoration aka symbol mangling C-enhancement Category: An issue proposing an enhancement or a PR with one. F-splat `#![feature(splat)]` labels Jul 13, 2026
@teor2345

Copy link
Copy Markdown
Contributor Author

r? @wesleywiser

@rustbot rustbot assigned wesleywiser and unassigned jhpratt Jul 13, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

@bors r+

However, I'm confused why splat needs custom mangling -- note that implies it will not demangle properly until downstream toolchains (perf, kernel, profilers, etc.) all update which will take years. Isn't #[splat] desugaring into an already supported form on stable today? Maybe we can mangle as-if there was (a, b, c) argument instead? Note that historically we have sometimes managed to find pre-existing options in the mangling (e.g., f16 and f128 iirc didn't need adjustments to rustc-demangle although I may be misremembering).

Obviously not too important while it's all unstable but worth thinking about during stabilization.

@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 82f4112 has been approved by Mark-Simulacrum

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 13, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 13, 2026
…rk-Simulacrum

Bump rustc-demangle to 0.1.28

This PR is part of the splat lang experiment: rust-lang#153629

It brings in the changes from rust-lang/rustc-demangle#90, which encode splatted types with a `w` prefix in type mangling. This is required to fix the symbol clashes in rust-lang#158644.

We need to upgrade the compiler and standard library to avoid "can't demangle" panics or errors. Some tools might work without the upgrade, but we might as well do it there as well.

@rustbot label +C-enhancement +F-splat +T-compiler +A-name-mangling
rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #159039 (resolve: fix effective visibilities for items in ambiguous glob sets)
 - #157706 (Deny `todo!()` in tidy)
 - #156712 (Pointer authentication config and user facing options)
 - #158535 (Support `#[track_caller]` on EII declarations)
 - #158632 (First steps of late-bound turbofishing (place FnDef behind a dummy binder))
 - #159002 (Small refactorings in `need_type_info` module)
 - #159202 (Bump rustc-demangle to 0.1.28)
 - #159216 (Avoid using probe self_ty for delegation arguments)
 - #159222 (semicolon_in_expressions_from_macros: Lint on non-local macros too)
 - #156609 (Consider structurally impossible Sized predicates in MIR)
 - #158854 (Add `#[rustc_test_entrypoint_marker]`)
 - #158998 (Some minor ast validation and visiting cleanups)
 - #159123 (doc: clarify attr parser APIs)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 13, 2026
…rk-Simulacrum

Bump rustc-demangle to 0.1.28

This PR is part of the splat lang experiment: rust-lang#153629

It brings in the changes from rust-lang/rustc-demangle#90, which encode splatted types with a `w` prefix in type mangling. This is required to fix the symbol clashes in rust-lang#158644.

We need to upgrade the compiler and standard library to avoid "can't demangle" panics or errors. Some tools might work without the upgrade, but we might as well do it there as well.

@rustbot label +C-enhancement +F-splat +T-compiler +A-name-mangling
rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #159039 (resolve: fix effective visibilities for items in ambiguous glob sets)
 - #157706 (Deny `todo!()` in tidy)
 - #158535 (Support `#[track_caller]` on EII declarations)
 - #158632 (First steps of late-bound turbofishing (place FnDef behind a dummy binder))
 - #158846 (Fix unused variable warnings for diverging expressions)
 - #159002 (Small refactorings in `need_type_info` module)
 - #159202 (Bump rustc-demangle to 0.1.28)
 - #159216 (Avoid using probe self_ty for delegation arguments)
 - #159222 (semicolon_in_expressions_from_macros: Lint on non-local macros too)
 - #156609 (Consider structurally impossible Sized predicates in MIR)
 - #157993 (Expose more info about ADTs and functions in rustc_public)
 - #158854 (Add `#[rustc_test_entrypoint_marker]`)
 - #158998 (Some minor ast validation and visiting cleanups)
 - #159123 (doc: clarify attr parser APIs)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 13, 2026
…rk-Simulacrum

Bump rustc-demangle to 0.1.28

This PR is part of the splat lang experiment: rust-lang#153629

It brings in the changes from rust-lang/rustc-demangle#90, which encode splatted types with a `w` prefix in type mangling. This is required to fix the symbol clashes in rust-lang#158644.

We need to upgrade the compiler and standard library to avoid "can't demangle" panics or errors. Some tools might work without the upgrade, but we might as well do it there as well.

@rustbot label +C-enhancement +F-splat +T-compiler +A-name-mangling
rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #159039 (resolve: fix effective visibilities for items in ambiguous glob sets)
 - #157706 (Deny `todo!()` in tidy)
 - #156047 (Fix trait method resolution on an adjusted never type)
 - #158535 (Support `#[track_caller]` on EII declarations)
 - #158632 (First steps of late-bound turbofishing (place FnDef behind a dummy binder))
 - #158846 (Fix unused variable warnings for diverging expressions)
 - #159002 (Small refactorings in `need_type_info` module)
 - #159202 (Bump rustc-demangle to 0.1.28)
 - #159216 (Avoid using probe self_ty for delegation arguments)
 - #156609 (Consider structurally impossible Sized predicates in MIR)
 - #157993 (Expose more info about ADTs and functions in rustc_public)
 - #158804 (Clarify `as_uninit_mut` may point to uninitialized memory)
 - #158854 (Add `#[rustc_test_entrypoint_marker]`)
 - #158998 (Some minor ast validation and visiting cleanups)
 - #159123 (doc: clarify attr parser APIs)
rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #157706 (Deny `todo!()` in tidy)
 - #158535 (Support `#[track_caller]` on EII declarations)
 - #158632 (First steps of late-bound turbofishing (place FnDef behind a dummy binder))
 - #158846 (Fix unused variable warnings for diverging expressions)
 - #159002 (Small refactorings in `need_type_info` module)
 - #159202 (Bump rustc-demangle to 0.1.28)
 - #159216 (Avoid using probe self_ty for delegation arguments)
 - #156609 (Consider structurally impossible Sized predicates in MIR)
 - #157993 (Expose more info about ADTs and functions in rustc_public)
 - #158804 (Clarify `as_uninit_mut` may point to uninitialized memory)
 - #158854 (Add `#[rustc_test_entrypoint_marker]`)
 - #158998 (Some minor ast validation and visiting cleanups)
 - #159123 (doc: clarify attr parser APIs)
@rust-bors rust-bors Bot merged commit 95dfc7e into rust-lang:main Jul 13, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 13, 2026
rust-timer added a commit that referenced this pull request Jul 13, 2026
Rollup merge of #159202 - teor2345:bump-rustc-demangle, r=Mark-Simulacrum

Bump rustc-demangle to 0.1.28

This PR is part of the splat lang experiment: #153629

It brings in the changes from rust-lang/rustc-demangle#90, which encode splatted types with a `w` prefix in type mangling. This is required to fix the symbol clashes in #158644.

We need to upgrade the compiler and standard library to avoid "can't demangle" panics or errors. Some tools might work without the upgrade, but we might as well do it there as well.

@rustbot label +C-enhancement +F-splat +T-compiler +A-name-mangling
@teor2345

Copy link
Copy Markdown
Contributor Author

However, I'm confused why splat needs custom mangling -- note that implies it will not demangle properly until downstream toolchains (perf, kernel, profilers, etc.) all update which will take years. Isn't #[splat] desugaring into an already supported form on stable today? Maybe we can mangle as-if there was (a, b, c) argument instead? Note that historically we have sometimes managed to find pre-existing options in the mangling (e.g., f16 and f128 iirc didn't need adjustments to rustc-demangle although I may be misremembering).

Yeah that's a good question. Splat is treated as a distinct function type, because it is de-tupled in the callee, but tupled in the caller (at typecheck time). It's currently lowered to the tupled type, but in future we want to lower it de-tupled for performance. So I guess we could mangle the types the same way as the de-tupled form, once we make that change. This would need changes to the legacy and v0 mangling schemes to de-tuple when they see splat.

While it's incomplete, it's useful to have the symbols be distinct, so we don't lock ourselves into either option. And it avoids symbol clashes, see #158644 for details.

Obviously not too important while it's all unstable but worth thinking about during stabilization.

I've added a note to the tracking issue to review this before stabilisation

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

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-name-mangling Area: Name mangling / decoration aka symbol mangling C-enhancement Category: An issue proposing an enhancement or a PR with one. F-splat `#![feature(splat)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. 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