Skip to content

Rollup of 11 pull requests - #163415

Closed
jhpratt wants to merge 38 commits into
rust-lang:mainfrom
jhpratt:rollup-f2v3C3V
Closed

jhpratt wants to merge 38 commits into
rust-lang:mainfrom
jhpratt:rollup-f2v3C3V

Conversation

@jhpratt

@jhpratt jhpratt commented Sep 27, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

iAeternus and others added 30 commits August 25, 2026 09:25
Instead of hardcoding the container layout assuming that the local
patches are in /build, look for them next to the script.  This helps
downstream distros to run this script if their container layout is
different and they don't put the musl working dir in /build.

This might be an unexpected change for some dowstream distros that
were using this script from another directory,but arranged for the
patches to still be in `/build`
It's a cut down version of `rustc_errors::DiagInner` that avoids `Span`.
It exists because `Span` used to not impl `Send` and so couldn't be sent
from codegen threads to the main thread. But that's no longer true and
we can send `DiagInner`s directly now.
By just storing `lo` and `hi` instead.
This whole section of the code deals with constructing an alternative
layout, but large nesting makes the control flow seem more complex than
it actually is.
Constructing these error variants is basically free
Having the generic list span multiple lines is quite jarring, and imo
easy to confuse with the parameter list at a glance.
Improves consistency, and hopefully clarifies the purpose of
previously-mysteriosly named methods like `univariant`.
Rustc already defaults to this for regular items whenever possible.
Overriding it would only lead to linker errors. And for
depending on the exact codegen unit partitioning rustc uses, so there it
is a bad idea to use it too.
* Implement Default for NumBuffer
* Make insta-stable
Rustc already defaults to this for #[no_mangle]/#[export_name] items.
There is no reason to explicitly use it.
A common definition is like a weak definition except that it must be a
zero-initialized static and when merging two common symbols with the
same name, the size and alignment are set to the higher of both symbols.
This is used for tentative definitions in C and doesn't have any reason
to exist outside of that. This behavior doesn't work across dylibs and
common symbols have inconsistent behavior across linkers [1]. It is also
fragile to rely on getting the largest size of all common symbol
definitions as a (possibly smaller) global definition can override it.

Link: https://maskray.me/blog/all-about-common-symbols [1]
The name makes some sense at the callsite, but inside the function, the
parameter refers to the `VariantIdx` that should be use for the
newly-created layout, so name accordingly.

Also move closer to the related `variants` param (Note: could consider
passing `variants[present_first]` instead of `variants`, as that's the
only way `variants` is used -- at the same type, passing `variants`
seems more consistent with the rest of the file.)
This is a more type-safe alternative for the `niche_optimizations: bool`
param
…t-module-typos, r=petrochenkov

Suggest similarly named modules in import paths

Fixes rust-lang#131366

The [last commit](rust-lang@cac7b61) is a seperated issue which fixed by the way.
[debugger visualizers] Add workaround to read `Rc` strong/weak counts

Implements a fix with the same goal as rust-lang#162725 of removing the infinite loop. Since `RcInner` is `#[repr(C)]`, we can just directly read the values from their known offsets. Worth noting that LLDB fails to even populate the fields and offsets when this bug occurs, so `#[repr(C)]` is a required invariant to retrieve the values from addresses like this:

```
(lldb) script lldb.frame.var("holder").GetNonSyntheticValue().GetChildAtIndex(0).GetChildAtIndex(0).GetChildAtIndex(0).GetType().GetPointeeType()

template<> struct RcInner<unsigned int> {
private:
    unsigned int value;
}
```

That `RcInner` should have a `strong` and `weak` field, but because LLDB can't read the type node, it omits them entirely. Thankfully, the `value` field is still read correctly and has an accurate offset.

This change has 1 small side effect, which is that the `weak` count is not decremented before it is displayed to the user. We can easily do that in the summary function, but imo it feels weird to lie about the value in memory? The `weak` count starts at 1 because the original `Rc` instance "holds" both a strong and a weak reference. It's mostly an artifact of `Rc`'s implementation, but if you're debugging, that seems like something that might matter.
…yout, r=Mark-Simulacrum

ci: make musl.sh look for patches next to the script

Instead of hardcoding the container layout assuming that the local patches are in `/build`, look for them next to the script.  This helps downstream distros to run this script if their container layout is different and they don't put the musl working dir in `/build`.

This might be an unexpected change for some downstream distros that were using this script from another directory,but arranged for the patches to still be in `/build`
Remove some #[linkage] options

These are either useless due to rustc already setting them whenever you would want them, actively breaking compiler invariants or both.

cc rust-lang#29603 (comment)
…r=JonathanBrouwer

mailmap: add Matilde Morrone

Adds myself to the mailmap
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 27, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc 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. T-infra Relevant to the infrastructure 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 Sep 27, 2026
@jhpratt

jhpratt commented Sep 27, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9c4968d has been approved by jhpratt

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 Sep 27, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 28, 2026
Rollup of 11 pull requests

Successful merges:

 - #163085 (Suggest similarly named modules in import paths)
 - #163098 ([debugger visualizers] Add workaround to read `Rc` strong/weak counts)
 - #163120 (ci: make musl.sh look for patches next to the script)
 - #163301 (Fix unused_must_use for scenario which may need to keep value)
 - #163307 (Less `SpanData` in diagnostics)
 - #152972 (implement PartialEq<VecDeque<U>> for Vec<T>, &[T], &mut [T], [T; N], &[T; N] and &mut [T; N])
 - #162536 (Implement Default for NumBuffer)
 - #163141 (Document safety requirements for intrinsic fallbacks)
 - #163384 (Various clean-ups around `LayoutCalculator`)
 - #163405 (Remove some #[linkage] options)
 - #163413 (mailmap: add Matilde Morrone)
@rust-bors

This comment has been minimized.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-various failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/linkage-attr/linkage-attr-does-not-panic-llvm-issue-33992.rs stdout ----

error: test compilation failed although it shouldn't!
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/linkage-attr/linkage-attr-does-not-panic-llvm-issue-33992.rs" "-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" "--target=wasm32-wasip1" "--check-cfg" "cfg(test,FALSE)" "-O" "--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" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/linkage-attr/linkage-attr-does-not-panic-llvm-issue-33992/a.wasm" "-Znext-solver=coherence" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/wasm32-wasip1/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: linking with `rust-lld` failed: exit status: 1
   |
   = note:  "rust-lld" "-flavor" "wasm" "--export" "_RNvCsinVMqPSwQZ9_44linkage_attr_does_not_panic_llvm_issue_339925TEST4" "--export" "_RNvCsinVMqPSwQZ9_44linkage_attr_does_not_panic_llvm_issue_339925TEST5" "--export" "_RNvCsinVMqPSwQZ9_44linkage_attr_does_not_panic_llvm_issue_339925TEST7" "--export" "_RNvCsinVMqPSwQZ9_44linkage_attr_does_not_panic_llvm_issue_339925TEST8" "--export" "__main_void" "-z" "stack-size=1048576" "--stack-first" "--no-demangle" "<sysroot>/lib/rustlib/wasm32-wasip1/lib/self-contained/crt1-command.o" "<2 object files omitted>" "<sysroot>/lib/rustlib/wasm32-wasip1/lib/{libstd-*,libpanic_abort-*,libwasip1-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*}.rlib" "-l" "c" "<sysroot>/lib/rustlib/wasm32-wasip1/lib/{librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-L" "/checkout/obj/build/wasm32-wasip1/native/rust-test-helpers" "-L" "<sysroot>/lib/rustlib/wasm32-wasip1/lib/self-contained" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/linkage-attr/linkage-attr-does-not-panic-llvm-issue-33992/a.wasm" "--gc-sections" "-O3" "--strip-debug"
   = note: some arguments are omitted. use `--verbose` to show all linker arguments
   = note: rust-lld: error: symbol exported via --export not found: _RNvCsinVMqPSwQZ9_44linkage_attr_does_not_panic_llvm_issue_339925TEST4
           rust-lld: error: symbol exported via --export not found: _RNvCsinVMqPSwQZ9_44linkage_attr_does_not_panic_llvm_issue_339925TEST5
           

error: aborting due to 1 previous error
------------------------------------------

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 28, 2026
@rust-bors

rust-bors Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 0c69304 failed: CI. Failed job:

@rust-bors rust-bors Bot 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 28, 2026
@rust-bors

rust-bors Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

PR #163405, which is a member of this rollup, was unapproved.

@jhpratt jhpratt closed this Sep 28, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 28, 2026
@jhpratt
jhpratt deleted the rollup-f2v3C3V branch September 28, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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.