Fix splat v0 mangling#158890
Conversation
|
rustbot has assigned @hanna-kruppe. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Just so you know, changes to the mangling scheme typically also have a corresponding PR to https://github.com/rust-lang/rustc-demangle 🙂
a30c0d8 to
afaae5b
Compare
This comment has been minimized.
This comment has been minimized.
|
Reminder, once the PR becomes ready for a review, use |
|
r? wesleywiser |
|
|
afaae5b to
1c094c4
Compare
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged.
cc @Amanieu, @folkertdev, @sayantn These commits modify the If this was unintentional then you should revert the changes before this PR is merged.
cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
36d0eb8 to
a34aad0
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. |
There was a problem hiding this comment.
I squashed most commits, but I left one of the symbol clash tests in a separate commit, because it depends on incremental compilation state.
(I found the issue without incremental compilation, but it involved a race condition or local state that would only trigger the linker error some of the time. The test seems stable in CI and locally now, but I want to leave it in a separate commit, just in case it becomes flaky.)
| //[legacy]~^ ERROR symbol-name(_ZN14splat_mangling4main66Type$LT$fn$LP$$C$$u20$$u23$$u5b$splat$u5d$$LP$u8$C$u32$RP$$RP$$GT | ||
| //[legacy]~| ERROR demangling(splat_mangling::main::Type<fn(, #[splat](u8,u32))>:: | ||
| //[legacy]~| ERROR demangling-alt(splat_mangling::main::Type<fn(, #[splat](u8,u32))>) | ||
| //[v0,default]~^^^^ ERROR symbol-name(_RMNvCsCRATE_HASH_14splat_mangling4mainINtB<REF>_4TypeFwThmEEuE) | ||
| //[v0,default]~| ERROR demangling(<splat_mangling[ | ||
| //[v0,default]~| ERROR demangling-alt(<splat_mangling::main::Type<fn(#[splat] (u8, u32))>>) |
There was a problem hiding this comment.
It's based on the existing mangling tests, so that the ERROR and symbol names line up across different variants, making them easier to compare.
Edit: this was extremely useful when comparing the splatted and non-splatted mangling.
rust/tests/ui/symbol-names/basic.rs
Lines 8 to 14 in b6839f4
|
@rustbot ready |
|
@bors r+ |
…esleywiser Fix splat v0 mangling Tracking issue: rust-lang#153629 Typecheck considers a splatted and non-splatted function as distinct types, so mangling has to include splatting. If it doesn't, we get symbol clashes. See the ticket and the tests in this PR for details. Demangling PR: rust-lang/rustc-demangle#90 Demangling in rust-lang/rust PR: rust-lang#159202 @rustbot label +C-bug +F-splat +T-compiler +A-name-mangling Fixes rust-lang#158644 This PR was based on rust-lang#159202, so we waited for that PR to merge first, then rebased this one.
…esleywiser Fix splat v0 mangling Tracking issue: rust-lang#153629 Typecheck considers a splatted and non-splatted function as distinct types, so mangling has to include splatting. If it doesn't, we get symbol clashes. See the ticket and the tests in this PR for details. Demangling PR: rust-lang/rustc-demangle#90 Demangling in rust-lang/rust PR: rust-lang#159202 @rustbot label +C-bug +F-splat +T-compiler +A-name-mangling Fixes rust-lang#158644 This PR was based on rust-lang#159202, so we waited for that PR to merge first, then rebased this one.
…esleywiser Fix splat v0 mangling Tracking issue: rust-lang#153629 Typecheck considers a splatted and non-splatted function as distinct types, so mangling has to include splatting. If it doesn't, we get symbol clashes. See the ticket and the tests in this PR for details. Demangling PR: rust-lang/rustc-demangle#90 Demangling in rust-lang/rust PR: rust-lang#159202 @rustbot label +C-bug +F-splat +T-compiler +A-name-mangling Fixes rust-lang#158644 This PR was based on rust-lang#159202, so we waited for that PR to merge first, then rebased this one.
Rollup of 12 pull requests Successful merges: - #159582 (Sync from portable simd 2026 07 20) - #158890 (Fix splat v0 mangling) - #159411 ([rustdoc] Correctly handle output options with --show-coverage) - #159647 (Remove `early_exit` closures) - #159656 (define a `Simd` type in `minicore`) - #156474 (Add paths for linked associated items) - #159211 (Fix debuginfo argument when invoking LLBC linker) - #159527 (Bring runtime symbols statics on par with foreign functions) - #159625 (Refactor is_opsem_inhabited) - #159652 (Remove `cfg(not(no_global_oom_handling))` from the `Drop` impl of `UniqueArcUninit`) - #159657 (Remove the blanket `#![cfg_attr(test, allow(unused))]` from bootstrap ) - #159663 (Add layout cycle hang regression test)
…esleywiser Fix splat v0 mangling Tracking issue: rust-lang#153629 Typecheck considers a splatted and non-splatted function as distinct types, so mangling has to include splatting. If it doesn't, we get symbol clashes. See the ticket and the tests in this PR for details. Demangling PR: rust-lang/rustc-demangle#90 Demangling in rust-lang/rust PR: rust-lang#159202 @rustbot label +C-bug +F-splat +T-compiler +A-name-mangling Fixes rust-lang#158644 This PR was based on rust-lang#159202, so we waited for that PR to merge first, then rebased this one.
Rollup of 13 pull requests Successful merges: - #159582 (Sync from portable simd 2026 07 20) - #158890 (Fix splat v0 mangling) - #159614 (debuginfo generation for unsafe binders) - #159647 (Remove `early_exit` closures) - #159656 (define a `Simd` type in `minicore`) - #156474 (Add paths for linked associated items) - #159211 (Fix debuginfo argument when invoking LLBC linker) - #159527 (Bring runtime symbols statics on par with foreign functions) - #159625 (Refactor is_opsem_inhabited) - #159629 (Add more splat rust-call regression tests) - #159652 (Remove `cfg(not(no_global_oom_handling))` from the `Drop` impl of `UniqueArcUninit`) - #159657 (Remove the blanket `#![cfg_attr(test, allow(unused))]` from bootstrap ) - #159663 (Add layout cycle hang regression test)
Rollup of 13 pull requests Successful merges: - #159582 (Sync from portable simd 2026 07 20) - #158890 (Fix splat v0 mangling) - #159614 (debuginfo generation for unsafe binders) - #159647 (Remove `early_exit` closures) - #159656 (define a `Simd` type in `minicore`) - #156474 (Add paths for linked associated items) - #159211 (Fix debuginfo argument when invoking LLBC linker) - #159527 (Bring runtime symbols statics on par with foreign functions) - #159625 (Refactor is_opsem_inhabited) - #159629 (Add more splat rust-call regression tests) - #159652 (Remove `cfg(not(no_global_oom_handling))` from the `Drop` impl of `UniqueArcUninit`) - #159657 (Remove the blanket `#![cfg_attr(test, allow(unused))]` from bootstrap ) - #159663 (Add layout cycle hang regression test)
Rollup merge of #158890 - teor2345:splat-mangling-clash, r=wesleywiser Fix splat v0 mangling Tracking issue: #153629 Typecheck considers a splatted and non-splatted function as distinct types, so mangling has to include splatting. If it doesn't, we get symbol clashes. See the ticket and the tests in this PR for details. Demangling PR: rust-lang/rustc-demangle#90 Demangling in rust-lang/rust PR: #159202 @rustbot label +C-bug +F-splat +T-compiler +A-name-mangling Fixes #158644 This PR was based on #159202, so we waited for that PR to merge first, then rebased this one.
Rollup of 13 pull requests Successful merges: - rust-lang/rust#159582 (Sync from portable simd 2026 07 20) - rust-lang/rust#158890 (Fix splat v0 mangling) - rust-lang/rust#159614 (debuginfo generation for unsafe binders) - rust-lang/rust#159647 (Remove `early_exit` closures) - rust-lang/rust#159656 (define a `Simd` type in `minicore`) - rust-lang/rust#156474 (Add paths for linked associated items) - rust-lang/rust#159211 (Fix debuginfo argument when invoking LLBC linker) - rust-lang/rust#159527 (Bring runtime symbols statics on par with foreign functions) - rust-lang/rust#159625 (Refactor is_opsem_inhabited) - rust-lang/rust#159629 (Add more splat rust-call regression tests) - rust-lang/rust#159652 (Remove `cfg(not(no_global_oom_handling))` from the `Drop` impl of `UniqueArcUninit`) - rust-lang/rust#159657 (Remove the blanket `#![cfg_attr(test, allow(unused))]` from bootstrap ) - rust-lang/rust#159663 (Add layout cycle hang regression test)
View all comments
Tracking issue: #153629
Typecheck considers a splatted and non-splatted function as distinct types, so mangling has to include splatting. If it doesn't, we get symbol clashes. See the ticket and the tests in this PR for details.
Demangling PR: rust-lang/rustc-demangle#90
Demangling in rust-lang/rust PR: #159202
@rustbot label +C-bug +F-splat +T-compiler +A-name-mangling
Fixes #158644
This PR was based on #159202, so we waited for that PR to merge first, then rebased this one.