Skip to content

Rollup of 7 pull requests#159741

Closed
JonathanBrouwer wants to merge 17 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Tx7t5ue
Closed

Rollup of 7 pull requests#159741
JonathanBrouwer wants to merge 17 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Tx7t5ue

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

jackh726 and others added 17 commits July 15, 2026 13:36
recv_inner returned the datagram length instead of the bytes copied into
the caller's buffer, and rxlen >= 4075 could index past the receive
buffer and panic. Clamp the count to both buffers, mirroring the earlier
send_to fix.
also add regression test for rmeta reproducibility when unrelated `rlib`
are in the search path

Co-authored-by: mejrs <59372212+mejrs@users.noreply.github.com>
…,Nadrieril

Abort const-eval queries early when there are generics in the type

Since [recently](rust-lang#156977), const validation has a `has_param` check, which means ConstToPat also implicitly has that check. But it seems better to check this again explicitly here rather then rely on an undocumented property of some other component. The new test behaves the same with or without the PR.

I recommend hiding whitespace difference, since rustfmt re-indendet a bunch of stuff.
Fixes rust-lang#150296
r? @BoxyUwU
std: fix Xous UDP recv length over-report and OOB panic

recv_inner returned the datagram length instead of the bytes copied into the caller's buffer, and rxlen >= 4075 could index past the receive buffer and panic. Clamp the count to both buffers, as in rust-lang#158928.
Add fallback for `intrinsics::fabs`

Add a fallback for the `fabs` intrinsic. Because it uses const traits and const ops it required adding `rustc_const_unstable` -- i'm not certain it's right but it seems to make sense. I also added `#[miri::intrinsic_fallback_is_spec]`, though im not sure if I need to modify the const eval code to remove `fabs` handling or to remove it from any of the backends

r? folkertdev
…r=petrochenkov

Make `DocLinkResMap` an `FxIndexMap`

Previously it was `FxHashMap`, changed to `UnordMap` in rust-lang#119093. The rationale then was to make the iteration order unobservable, but it turned out to be leaky.

This change means the encoder outputs `doc_link_resolutions` entries in insertion order, and iteration order of the `DocLinkResMap` is now observable. I believe this doesn't affect correctness elsewhere, but I'm not very familiar with the codebase so I may be missing something

* Closes rust-lang#159677

Discussed on zulip: [#t-compiler/help > rust-lang#159677: rmeta encoding is not stable](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.23159677.3A.20rmeta.20encoding.20is.20not.20stable/with/612134270)
…-variant, r=lqd

Add new variant to iterating-updating-mutref borrowck test

This is a useful variant to consider when porting to a-mir-formality.

r? lqd
fs::hard_link: use linkat on Android

According to rust-lang@6249cda, `linkat` needs API level 21. That is ancient (2014, Android 5). Our [target page](https://doc.rust-lang.org/rustc/platform-support/android.html) does not say which minimum Android version or API level we support, it just says:

> Rust will support the most recent Long Term Support (LTS) Android Native Development Kit (NDK). By default Rust will support all API levels supported by the NDK, but a higher minimum API level may be required if deemed necessary.

That's pretty useless as I have no idea how I'd figure out what the "API levels support by the NDK" are.
Cc @chriswailes @jfgoog @maurer @pirama-arumuga-nainar

Fixes rust-lang/miri#5080
…e1-dead

Consider `()` as suspicious only when expecting `!` for runtime symbols

Consider `()` as suspicious only when expecting `!` for runtime symbols, as `!` is considered ABI compatible in Rust with `()` (rust-lang#159446 (comment)).

Fixes rust-lang#159446
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 22, 2026
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 22, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-*

@rust-bors

rust-bors Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

📌 Commit d5d4795 has been approved by JonathanBrouwer

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

rust-bors Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit d5d4795 with merge c6fb7ca

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

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

rust-bors Bot pushed a commit that referenced this pull request Jul 22, 2026
Rollup of 7 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-*
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
To only update this specific test, also pass `--test-args lint/runtime-symbols-unix.rs`

error: 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/stage1/bin/rustc" "/checkout/tests/ui/lint/runtime-symbols-unix.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/stage1" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lint/runtime-symbols-unix" "-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" "--edition=2021"
stdout: none
--- stderr -------------------------------
error: invalid definition of the runtime `open` symbol used by the standard library
##[error]  --> /checkout/tests/ui/lint/runtime-symbols-unix.rs:14:5
   |
---
   |         ^^^^^^^^^^^^^^^
   |
   = note: expected `unsafe extern "C" fn(i32, *const c_void, usize) -> isize`
           found    `unsafe extern "C" fn()`
   = help: either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = "write")]`, or `#[link_name = "write"]`

error: invalid definition of the runtime `close` symbol used by the standard library
##[error]  --> /checkout/tests/ui/lint/runtime-symbols-unix.rs:26:5
   |
LL |     pub static close: () = ();
---
   |         ^^^^^^^^^^^^^^
   |
   = note: expected `unsafe extern "C" fn(*mut c_void)`
           found    `unsafe extern "C" fn()`
   = help: either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = "free")]`, or `#[link_name = "free"]`

error: invalid definition of the runtime `exit` symbol used by the standard library
##[error]  --> /checkout/tests/ui/lint/runtime-symbols-unix.rs:39:9
   |
LL |         pub fn exit();
---

warning: suspicious definition of the runtime `open` symbol used by the standard library
##[warning]  --> /checkout/tests/ui/lint/runtime-symbols-unix.rs:46:9
   |
LL |         pub fn open(path: *const u8, oflag: usize, ...) -> c_int;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected `unsafe extern "C" fn(*const i8, i32, ...) -> i32`
           found    `unsafe extern "C" fn(*const u8, usize, ...) -> i32`
   = help: either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = "open")]`, or `#[link_name = "open"]`
---
   |
LL |         pub fn free(ptr: *const u8);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected `unsafe extern "C" fn(*mut c_void)`
           found    `unsafe extern "C" fn(*const u8)`
   = help: either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = "free")]`, or `#[link_name = "free"]`
   = help: allow this lint if the signature is compatible

warning: suspicious definition of the runtime `exit` symbol used by the standard library
##[warning]  --> /checkout/tests/ui/lint/runtime-symbols-unix.rs:52:9
   |
---

warning: suspicious definition of the runtime `exit` symbol used by the standard library
##[warning]  --> /checkout/tests/ui/lint/runtime-symbols-unix.rs:57:9
   |
LL |         pub static exit2: Option<unsafe extern "C" fn(f32) -> !>;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected `unsafe extern "C" fn(i32) -> !`
           found    `unsafe extern "C" fn(f32) -> !`
   = help: either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = "exit")]`, or `#[link_name = "exit"]`

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
To only update this specific test, also pass `--test-args lint/runtime-symbols-unix.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/lint/runtime-symbols-unix.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/lint/runtime-symbols-unix" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2021"
stdout: none
--- stderr -------------------------------
error: invalid definition of the runtime `open` symbol used by the standard library
##[error]  --> /checkout/tests/ui/lint/runtime-symbols-unix.rs:14:5
   |
---
   |         ^^^^^^^^^^^^^^^
   |
   = note: expected `unsafe extern "C" fn(i32, *const c_void, usize) -> isize`
           found    `unsafe extern "C" fn()`
   = help: either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = "write")]`, or `#[link_name = "write"]`

error: invalid definition of the runtime `close` symbol used by the standard library
##[error]  --> /checkout/tests/ui/lint/runtime-symbols-unix.rs:26:5
   |
LL |     pub static close: () = ();
---
   |         ^^^^^^^^^^^^^^
   |
   = note: expected `unsafe extern "C" fn(*mut c_void)`
           found    `unsafe extern "C" fn()`
   = help: either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = "free")]`, or `#[link_name = "free"]`

error: invalid definition of the runtime `exit` symbol used by the standard library
##[error]  --> /checkout/tests/ui/lint/runtime-symbols-unix.rs:39:9
   |
LL |         pub fn exit();
---

warning: suspicious definition of the runtime `open` symbol used by the standard library
##[warning]  --> /checkout/tests/ui/lint/runtime-symbols-unix.rs:46:9
   |
LL |         pub fn open(path: *const u8, oflag: usize, ...) -> c_int;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected `unsafe extern "C" fn(*const u8, i32, ...) -> i32`
           found    `unsafe extern "C" fn(*const u8, usize, ...) -> i32`
   = help: either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = "open")]`, or `#[link_name = "open"]`
---
   |
LL |         pub fn free(ptr: *const u8);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected `unsafe extern "C" fn(*mut c_void)`
           found    `unsafe extern "C" fn(*const u8)`
   = help: either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = "free")]`, or `#[link_name = "free"]`
   = help: allow this lint if the signature is compatible

warning: suspicious definition of the runtime `exit` symbol used by the standard library
##[warning]  --> /checkout/tests/ui/lint/runtime-symbols-unix.rs:52:9
   |
---

warning: suspicious definition of the runtime `exit` symbol used by the standard library
##[warning]  --> /checkout/tests/ui/lint/runtime-symbols-unix.rs:57:9
   |
LL |         pub static exit2: Option<unsafe extern "C" fn(f32) -> !>;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected `unsafe extern "C" fn(i32) -> !`
           found    `unsafe extern "C" fn(f32) -> !`
   = help: either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = "exit")]`, or `#[link_name = "exit"]`

@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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 22, 2026
@rust-bors

rust-bors Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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

This rollup was thus unapproved.

@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 Jul 22, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors

rust-bors Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

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

Labels

A-run-make Area: port run-make Makefiles to rmake.rs rollup A PR which is a rollup 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.

9 participants