Skip to content

Rollup of 13 pull requests - #165488

Open
jhpratt wants to merge 42 commits into
rust-lang:mainfrom
jhpratt:rollup-jqnWnyJ
Open

jhpratt wants to merge 42 commits into
rust-lang:mainfrom
jhpratt:rollup-jqnWnyJ

Conversation

@jhpratt

@jhpratt jhpratt commented Nov 5, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

bjorn3 and others added 30 commits October 28, 2026 11:44
This reduces the amount of special casing #[no_mangle] needs in the rest
of the compiler.
#[link_ordinal] is not compatible with #[link_name] and items in extern
blocks now have an implicit #[link_name] with the item name.
Alternatively it would be possible to suppress the error message for
this implicit #[link_name].
Co-authored-by: Ralf Jung <post@ralfj.de>
Windows has a similar flag `/forceInterlockedFunctions`, which uses
names such as `_InterlockedAdd64_rel`.

This is a re-land of 1ed1b6e ("Enable `outline-atomics` by default
on AArch64 Windows platforms").
Per LLVM commit c5e7e64 ("[AArch64][Clang][Linux] Enable
out-of-line atomics by default.") [1], Clang enables these on Android.
Thus, do the same in Rust.

This is a re-land of c455903 ("Enable `outline-atomics` by default
on AArch64 Android").

[1]: llvm/llvm-project@c5e7e649d537067de
Clang has done this by default since LLVM commit 1a963d3 ("[Driver]
Make -moutline-atomics default for aarch64-fuchsia targets"), [1], so do
the same here.

This is a re-land of 21525f8 ("Enable `outline-atomics` by default
on AArch64 Fuchsia").

[1]: llvm/llvm-project@1a963d3
Clang has recently started doing this, as of LLVM commit 5d774ec8d183
("[Driver] Enable outline atomics for OpenBSD/aarch64") [1]. Thus, do
the same here.

This is a re-land of 66c150c ("Enable `outline-atomics` by default
on AArch64 OpenBSD").

[1]: llvm/llvm-project@5d774ec
Many aarch64 targets without LSE in the baseline enable the
`outline-atomics` feature, which uses runtime detection of LSE for its
faster atomic ops. This provides nontrivial performance improvements on
most hardware from the past decade, at a small cost to anything pre-LSE.

This matches what Clang does [1].

This is a re-land of 383053e ("Enable `outline-atomics` by default
on AArch64 FreeBSD").

[1]: llvm/llvm-project@e24f901
```
note: method defined here, with 0 generic parameters
  --> $DIR/ufcs-qpath-missing-params.rs:4:8
   |
LL | pub trait IntoCow<'a, B: ?Sized> where B: ToOwned {
LL |     fn into_cow(self) -> Cow<'a, B>;
   |        ^^^^^^^^
```
Since L4Re currently has no openat support, the dir module used in the
metadata function is not available to use.
…te-mir

* add next-solver regression test for recursive opaque ices under validate-mir
* move compile-flags to the top of the test and note that it used to ice
* add next-solver regression tests for two fixed ices
* move compile-flags to the top of the tests and note that they used to ice
…=ShoyuVanilla

Fancy paramenv accessors that communicate the access pattern better.

r? @lcnr or @rust-lang/initiative-trait-system-refactor

This is a single commit, to precede the future change of "compressed trait clauses". It adds a lot of the infrastructure, without making any real changes that may affect performance. As such it forms a separately reviewable step. Even though this isn't on its own such a useful change, it mostly refactors things, it does still make for a nicer API surface.

Importantly, with compressed trait clauses (i.e. encoding some common traits as `where self_ty : <bitset of common traits>`), it becomes very important to be careful with how we iterate over caller bounds. I've tried other methods, but the typestate API (as proposed in this PR) is the only one I've found that's both ergonomic, and still allows for implementing compressed trait clauses performantly.

> [!NOTE]
> I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.
[tiny] Show context for found assoc item in E0107

The first code line is new:
```
note: method defined here, with 0 generic parameters
  --> $DIR/ufcs-qpath-missing-params.rs:4:8
   |
LL | pub trait IntoCow<'a, B: ?Sized> where B: ToOwned {
LL |     fn into_cow(self) -> Cow<'a, B>;
   |        ^^^^^^^^
```
std: Fix build for the L4Re targets

Since L4Re currently has no openat support, the dir module used in the metadata function is not available to use.
…maxdexh

Add BTreeMap::allocator and BTreeSet::allocator

Added an api extension `BTreeMap::allocator` the same way `Vec`, `VecDeque` and `BinaryHeap` have it.

Tracking issue [rust-lang#163177](rust-lang#163177)

Using a custom allocator with `BTreeMap<K, V, A>`  currently needs both `btreemap_alloc` and `allocator_ext`. Should `btreemap_alloc` be folded into `allocator_ext`?

r? @nia-e
…s, r=workingjubilee

Don't "exit" using `panic` on teeos

Fixes rust-lang#162847

On teeos, calling `exit` is not expected. There is also no `main` to implicitly exit, as the target exclusively uses dylibs.

Currently, calling `std::process::exit` on `teeos` calls `cleanup`, which calls `unimplemented`.
It doesn't make sense to "fail" to exit this way, as it just calls the user-controlled panic hook, which may keep the program alive for longer.

This PR makes it abort instead.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Nov 5, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-btree Area: `std::collections::{BTreeMap, BTreeSet}` A-collections Area: `std::collections` (prefer A-binaryheap, A-btree, A-hashtable, A-linkedlist, A-vecdeque) 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Nov 5, 2026
@jhpratt

jhpratt commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 840542c 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 Nov 5, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 5, 2026
Rollup of 13 pull requests

Successful merges:

 - #163477 (Fancy paramenv accessors that communicate the access pattern better.)
 - #160593 (turn ABI-controlling target features into a target modifier)
 - #164896 (offload: pass the linked device image to the host pass)
 - #165468 (Remove return type from `BuilderMethods::store`)
 - #159374 (Lower #[no_mangle] to #[symbol_name]/#[link_name])
 - #164564 (Re-enable outline-atomics by default on more AArch64 platforms)
 - #164623 (add next-solver regression tests for two fixed ices)
 - #164678 (add next-solver regression test for recursive opaque ICE under validate-mir)
 - #165429 (Add tests for `-Zcrate-attr` edition and position)
 - #165430 ([tiny] Show context for found assoc item in E0107)
 - #165456 (std: Fix build for the L4Re targets)
 - #165463 (Add BTreeMap::allocator and BTreeSet::allocator)
 - #165466 (Don't "exit" using `panic` on teeos)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
---- [run-make] tests\run-make\raw-dylib-link-ordinal stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\run-make\\raw-dylib-link-ordinal\\rmake.exe"
stdout: none
--- stderr -------------------------------
"D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\run-make\\raw-dylib-link-ordinal\\rmake_out" "--crate-type" "lib" "--crate-name" "raw_dylib_test" "lib.rs" "--target=x86_64-pc-windows-gnu"
output status: `exit code: 0`
=== STDOUT ===



=== STDERR ===



command failed at line 21
"D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\run-make\\raw-dylib-link-ordinal\\rmake_out" "--crate-type" "bin" "driver.rs" "--target=x86_64-pc-windows-gnu"
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
  |
  = note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\run-make\\raw-dylib-link-ordinal\\rmake_out\\rustcLrnyU7\\symbols.o" "<2 object files omitted>" "-Wl,-Bstatic" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\run-make\\raw-dylib-link-ordinal\\rmake_out/libraw_dylib_test.rlib" "<sysroot>\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,libwindows_link-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lkernel32" "-lkernel32" "-lntdll" "-luserenv" "-lws2_32" "-ldbghelp" "-lsynchronization" "-lgcc_eh" "-l:libpthread.a" "-lmsvcrt" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-lmingwex" "-luser32" "-lkernel32" "-Wl,--nxcompat" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\run-make\\raw-dylib-link-ordinal\\rmake_out" "-o" "driver.exe" "-Wl,--gc-sections" "-nodefaultlibs"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: D:/a/rust/rust/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\rust\rust\build\x86_64-pc-windows-gnu\test\run-make\raw-dylib-link-ordinal\rmake_out\libraw_dylib_test.rlib(raw_dylib_test.raw_dylib_test.bf20be1d80a0a232-cgu.0.rcgu.o):raw_dylib_test.bf20be1d80a0a232-cgu.0:(.text+0x5): undefined reference to `raw_dylib_test::imported_function'
          D:/a/rust/rust/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\rust\rust\build\x86_64-pc-windows-gnu\test\run-make\raw-dylib-link-ordinal\rmake_out\libraw_dylib_test.rlib(raw_dylib_test.raw_dylib_test.bf20be1d80a0a232-cgu.0.rcgu.o):raw_dylib_test.bf20be1d80a0a232-cgu.0:(.text+0xc): undefined reference to `__imp__RNvCsgpmTI78aMj6_14raw_dylib_test17imported_variable'
          D:/a/rust/rust/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\rust\rust\build\x86_64-pc-windows-gnu\test\run-make\raw-dylib-link-ordinal\rmake_out\libraw_dylib_test.rlib(raw_dylib_test.raw_dylib_test.bf20be1d80a0a232-cgu.0.rcgu.o):raw_dylib_test.bf20be1d80a0a232-cgu.0:(.text+0x1d): undefined reference to `__imp__RNvCsgpmTI78aMj6_14raw_dylib_test17imported_variable'
          D:/a/rust/rust/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\rust\rust\build\x86_64-pc-windows-gnu\test\run-make\raw-dylib-link-ordinal\rmake_out\libraw_dylib_test.rlib(raw_dylib_test.raw_dylib_test.bf20be1d80a0a232-cgu.0.rcgu.o):raw_dylib_test.bf20be1d80a0a232-cgu.0:(.text+0x35): undefined reference to `__imp__RNvCsgpmTI78aMj6_14raw_dylib_test17imported_variable'
          D:/a/rust/rust/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\rust\rust\build\x86_64-pc-windows-gnu\test\run-make\raw-dylib-link-ordinal\rmake_out\libraw_dylib_test.rlib(raw_dylib_test.raw_dylib_test.bf20be1d80a0a232-cgu.0.rcgu.o):raw_dylib_test.bf20be1d80a0a232-cgu.0:(.text+0x4f): undefined reference to `__imp__RNvCsgpmTI78aMj6_14raw_dylib_test17imported_variable'
          D:/a/rust/rust/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\rust\rust\build\x86_64-pc-windows-gnu\test\run-make\raw-dylib-link-ordinal\rmake_out\libraw_dylib_test.rlib(raw_dylib_test.raw_dylib_test.bf20be1d80a0a232-cgu.0.rcgu.o):raw_dylib_test.bf20be1d80a0a232-cgu.0:(.text+0x5a): undefined reference to `raw_dylib_test::print_imported_variable'
          D:/a/rust/rust/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\rust\rust\build\x86_64-pc-windows-gnu\test\run-make\raw-dylib-link-ordinal\rmake_out\libraw_dylib_test.rlib(raw_dylib_test.raw_dylib_test.bf20be1d80a0a232-cgu.0.rcgu.o):raw_dylib_test.bf20be1d80a0a232-cgu.0:(.text+0x61): undefined reference to `__imp__RNvCsgpmTI78aMj6_14raw_dylib_test17imported_variable'
          D:/a/rust/rust/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\rust\rust\build\x86_64-pc-windows-gnu\test\run-make\raw-dylib-link-ordinal\rmake_out\libraw_dylib_test.rlib(raw_dylib_test.raw_dylib_test.bf20be1d80a0a232-cgu.0.rcgu.o):raw_dylib_test.bf20be1d80a0a232-cgu.0:(.text+0x82): undefined reference to `__imp__RNvCsgpmTI78aMj6_14raw_dylib_test17imported_variable'
          D:/a/rust/rust/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\rust\rust\build\x86_64-pc-windows-gnu\test\run-make\raw-dylib-link-ordinal\rmake_out\libraw_dylib_test.rlib(raw_dylib_test.raw_dylib_test.bf20be1d80a0a232-cgu.0.rcgu.o):raw_dylib_test.bf20be1d80a0a232-cgu.0:(.text+0x9a): undefined reference to `__imp__RNvCsgpmTI78aMj6_14raw_dylib_test17imported_variable'
          D:/a/rust/rust/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\rust\rust\build\x86_64-pc-windows-gnu\test\run-make\raw-dylib-link-ordinal\rmake_out\libraw_dylib_test.rlib(raw_dylib_test.raw_dylib_test.bf20be1d80a0a232-cgu.0.rcgu.o):raw_dylib_test.bf20be1d80a0a232-cgu.0:(.text+0xb4): undefined reference to `__imp__RNvCsgpmTI78aMj6_14raw_dylib_test17imported_variable'
          D:/a/rust/rust/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\rust\rust\build\x86_64-pc-windows-gnu\test\run-make\raw-dylib-link-ordinal\rmake_out\libraw_dylib_test.rlib(raw_dylib_test.raw_dylib_test.bf20be1d80a0a232-cgu.0.rcgu.o):raw_dylib_test.bf20be1d80a0a232-cgu.0:(.text+0xbf): undefined reference to `raw_dylib_test::print_imported_variable'
          collect2.exe: error: ld returned 1 exit status
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link

error: aborting due to 1 previous error
---
Currently active steps:
test::RunMake { test_compiler: Compiler { stage: 2, host: x86_64-pc-windows-gnu, forced_compiler: false }, target: x86_64-pc-windows-gnu } at src\bootstrap\src\core\build_steps\test.rs:2109
test::Compiletest { test_compiler: Compiler { stage: 2, host: x86_64-pc-windows-gnu, forced_compiler: false }, target: x86_64-pc-windows-gnu, mode: run-make, suite: "run-make", path: "tests/run-make", compare_mode: None } at src\bootstrap\src\core\build_steps\test.rs:2109
Build completed unsuccessfully in 1:58:54
make: *** [Makefile:126: ci-mingw-x] Error 1
  local time: Thu Nov  5 07:52:07 CUT 2026
  network time: Thu, 05 Nov 2026 07:52:07 GMT
##[error]Process completed with exit code 2.
##[group]Run echo "disk usage:"
echo "disk usage:"

@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 Nov 5, 2026
@rust-bors

rust-bors Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

💔 Test for f12dc29 failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors try jobs=test-x86_64-mingw-1

rust-bors Bot pushed a commit that referenced this pull request Nov 5, 2026
Rollup of 13 pull requests


try-job: test-x86_64-mingw-1
@rust-bors

rust-bors Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

⌛ Trying commit 840542c with merge f138351…

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/41991574281

@jhpratt

jhpratt commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

@JonathanBrouwer I think this is potentially caused by #159374? It touches linking, at least…

@JonathanBrouwer

Copy link
Copy Markdown
Member

I could believe that, started a try job there as well

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-attributes Area: Attributes (`#[…]`, `#![…]`) A-btree Area: `std::collections::{BTreeMap, BTreeSet}` A-collections Area: `std::collections` (prefer A-binaryheap, A-btree, A-hashtable, A-linkedlist, A-vecdeque) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. rollup A PR which is a rollup 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.