Skip to content

Rollup of 15 pull requests - #161942

Closed
JonathanBrouwer wants to merge 39 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-FSAnPkk
Closed

Rollup of 15 pull requests#161942
JonathanBrouwer wants to merge 39 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-FSAnPkk

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

jnkel and others added 30 commits August 19, 2026 16:43
… on different platforms + fixed BSD-based systems to use fchmodat with AT_SYMLINK_NOFOLLOW
…tored non-BSD-based/non-Linux platforms to use OpenOptions open + set_permissions, and refactored tests accordingly
…ns ENOTSUP (e.g. for Ubuntu 20.04 returns ENOTSUP on non-symlinks + symlinks when using fchmodat with AT_SYMLINK_NOFOLLOW). Update docs accordingly as well and corrected behavior + docs for other Unix platforms with symlinks should return `FilesystemLoop` error instead of `InvalidInput` due to not setting `OpenOptions` with read enabled.

Co-authored-by: Rachel Barker <rachel.barker@ferrous-systems.com>
…d fchmodat platform call on fchmodat and every platform falls back to open + fchmod when _res is set to ErrorKind::Unsupported; updated docs to reflect change
seek(SeekFrom::End(0)) special-cased the offset to the UEFI
0xFFFFFFFFFFFFFFFF "set position to end of file" sentinel, then returned
that value as the new stream position. so seek reported u64::MAX instead
of the file size, and the default Seek::stream_len did too. compute the
offset from the file size in every End case instead.
… r=clarfonthey

Refactored docs for `std::fs::set_permissions_nofollow` + fix BSD-based systems to use fchmodat with AT_SYMLINK_NOFOLLOW flag

This PR refactors documentations for `std::fs::set_permissions_nofollow` and fixes BSD-based systems + Android to use `fchmodat` with `AT_SYMLINK_NOFOLLOW` flag (instead of no flag set) and refactors all other platforms to defer to `OpenOptions` with `O_NOFOLLOW` behavior.

r? @clarfonthey
Since they looked at the original `set_permissions_nofollow` PR I made

cc @RalfJung
…ures, r=nikic

attach global target features to module-level assembly

fixes rust-lang#80608
fixes rust-lang#127269

At long last, we can forward global target features to LLVM and it will preserve the target features a block of module-level assembly was defined with through LTO.

cc @nikic (who made this happen)
cc @RalfJung any nasty side-effects we might be overlooking here?
…er_types, r=BoxyUwU

fix ICE in generic_const_parameter_types with inherents

tracking issue: rust-lang#137626

relevant PR where the code was added: rust-lang#154853 (fyi ping @lapla-cogito - nws that this was buggy, it's extreeeemely subtle and easy to miss! ❤️ I mean, I also reviewed that PR and missed it too :3 )

discovered when implementing a change that explicitly tracks whether the args for inherent associated consts are in "self form" or "impl form"

Following along the test case:

- `normalize_canonicalized_inherent_projection` is called with `AliasTermKind::InherentConst` with the generic args being in "self form", i.e. `[ThreeTypes<u8, u16, u32>]`
- `traits::normalize_inherent_projection` is called with said alias
  - it calls `compute_inherent_assoc_term_args`, which does the dance of generating fresh vars for each param in the impl block, equating with the self type, and returning what the fresh vars solved to. This converts from "self args" to "impl args", i.e. `[u8, u16, u32]`
  - it then calls `const_of_item` and instantiates with `[u8, u16, u32]`. this is correct and good, `const_of_item` expects "impl form" args.
  - it then calls `push_const_arg_has_type_obligation`
    - which calls `type_of` and instantiates with `[u8, u16, u32]` to fetch the type of the const, to be able to register a `ConstArgHasType`. this is correct and good, `type_of` expects "impl form" args.
  - `traits::normalize_inherent_projection` returns, dropping the impl form args it computed
- `normalize_canonicalized_inherent_projection` calls `ocx.register_obligations(const_arg_has_type_obligation(...))`, passing `goal`. Remember that `goal` has the original "self args" generic arg format.
  - `const_arg_has_type_obligation` calls `type_of` and instantiates with `[ThreeTypes<u8, u16, u32>]`. This is no good very bad!! `type_of` expects "impl form" args, not "self form"!!
  - ICE!! `type parameter T3/rust-lang#2 (T3/rust-lang#2/2) out of range when instantiating, args=[ThreeTypes<u8, u16, u32>]`

The reason I filed this under `feature(generic_const_parameter_types)` is because for this bug to manifest, `type_of` must return a type that actually references a generic param to be able to trigger an ICE. Otherwise, the buggy incorrect args are silently ignored and compilation continues "fine".

The fix:

`normalize_inherent_projection` already registers a `ConstArgHasType`. why are we doing it a second time. just delete it. 💀

r? @BoxyUwU
…est, r=petrochenkov

Add test for parallel compiler reproducible build

Adds a test for reproducible binaries when using parallel compiler.

Confirmed with bisection and manual testing that rust-lang#144722 fixed rust-lang#140413, added test fails before commit (075ce31) from rust-lang#144722.
```rust
********************************************************************************
Regression in nightly-2025-08-14
********************************************************************************

fetching https://static.rust-lang.org/dist/2025-08-13/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2025-08-13: 40 B / 40 B [============================================================================================================================================================================] 100.00 % 357.18 KB/s converted 2025-08-13 to 8e62bfd
fetching https://static.rust-lang.org/dist/2025-08-14/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2025-08-14: 40 B / 40 B [============================================================================================================================================================================] 100.00 % 123.86 KB/s converted 2025-08-14 to 3672a55
looking for regression commit between 2025-08-13 and 2025-08-14
fetching (via remote github) commits from max(8e62bfd, 2025-08-11) to 3672a55
ending github query because we found starting sha: 8e62bfd
get_commits_between returning commits, len: 7
  commit[0] 2025-08-12: Auto merge of rust-lang#144678 - jdonszelmann:no-mangle-extern, r=bjorn3
  commit[1] 2025-08-12: Auto merge of rust-lang#145295 - Kobzol:unify-stages, r=jieyouxu
  commit[2] 2025-08-13: Auto merge of rust-lang#145093 - nikic:dead-on-return, r=nnethercote
  commit[3] 2025-08-13: Auto merge of rust-lang#145334 - Kobzol:rollup-fs5a133, r=Kobzol
  commit[4] 2025-08-13: Auto merge of rust-lang#144722 - ywxt:parallel-reproducibile, r=SparrowLii
  commit[5] 2025-08-13: Auto merge of rust-lang#145298 - nikic:llvm21-rc3, r=cuviper
  commit[6] 2025-08-13: Auto merge of rust-lang#145366 - GuillaumeGomez:rollup-v0a6v3u, r=GuillaumeGomez
```

Fixes rust-lang#140413.

r? @petrochenkov
…eyouxu

[bootstrap] Don't reverse the order of dylib search path entries

The `add_dylib_path` helper function prepends paths to the beginning of the dynamic linker search path, but it reverses their order while doing so. This is surprising and undocumented, and seems to be unexpected by several callers of this function.

Particularly, [`rustc_lib_paths`](https://github.com/rust-lang/rust/blob/f7d782a3be46d6bb4b9792fe69a61db389ba1769/src/bootstrap/src/core/builder/mod.rs#L1375) appends the `ci-llvm` path to the list it returns; reversing the order puts `ci-llvm` at a higher priority than the compiler's lib directory. On my system, this currently causes `./x test` to fail (when building the unstable book), because the stage0 compiler is run using CI LLVM instead of stage0 LLVM (which are currently different because stage0 is on LLVM 22 while main is on LLVM 23).

Might be worth a try build as this change could potentially cause issues if there is somewhere we depend on this ordering reversal. I checked all the call-sites (and ran `./x test` locally) and I don't think anyone *intentionally* relied on the ordering being reversed. I did find one snippet that concerned me (from rust-lang#144303, cc @Kobzol):

https://github.com/rust-lang/rust/blob/f7d782a3be46d6bb4b9792fe69a61db389ba1769/src/bootstrap/src/core/build_steps/test.rs#L437-L448

The comment states we're inserting `builder.rustc_libdir(tested_compiler)` at the highest priority in the search path, but because `add_dylib_path` reversed the ordering, it's actually inserted at the *lowest* priority. I don't know how to reproduce the issue this was supposed to fix, so I can't be sure that this PR doesn't cause a regression.

Follow-up to rust-lang#161335. r? @jieyouxu
…, r=nia-e

Document PartialOrd behavior for Option<T> where T: PartialOrd

Fixes [rust-lang#161746]("rust-lang#161746")
This is my first time contributing to Rust and all feedback is welcome.
I ran these after making changes.
`./x test library/core --stage 1`
`./x.py setup`
`./x test tidy --bless`
…oxyUwU

Retroactively add relnotes for `bool::{ok_or,ok_or_else}` (1.98.0)

Looks like this was lost:

- Relnotes issue: rust-lang#156336
- Tracking issue: rust-lang#142748
- Stabilization PR: rust-lang#156594

Closes rust-lang#156336.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 28, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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-release Relevant to the release subteam, 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Aug 28, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ 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-1,aarch64-apple-2,x86_64-mingw-1,i686-msvc-1,i686-msvc-2

@rust-bors

rust-bors Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 701c061 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 Aug 28, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 28, 2026
Rollup of 15 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-1
try-job: aarch64-apple-2
try-job: x86_64-mingw-1
try-job: i686-msvc-1
try-job: i686-msvc-2
@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)
---- [run-make] tests/run-make/parallel-reproducible-build stdout ----

error: rmake recipe failed to complete
status: exit status: 1
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/parallel-reproducible-build/rmake_out" && env -u RUSTFLAGS -u __RUSTC_DEBUG_ASSERTIONS_ENABLED -u __STD_DEBUG_ASSERTIONS_ENABLED -u __STD_REMAP_DEBUGINFO_ENABLED AR="ar" BUILD_ROOT="/checkout/obj/build/x86_64-unknown-linux-gnu" CC="cc" CC_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -w" CXX="c++" CXX_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -w" HOST_RUSTC_DYLIB_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/bootstrap-tools/x86_64-unknown-linux-gnu/release/build/run_make_support/de791e679a8f54a5/out:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin" LLVM_COMPONENTS="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils abi aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgputargetmca amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cas cfguard cgdata codegen codegentypes core coroutines coverage csky cskyasmparser cskycodegen cskydesc cskydisassembler cskyinfo debuginfobtf debuginfocodeview debuginfodwarf debuginfodwarflowlevel debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dtlto dwarfcfichecker dwarflinker dwarflinkerclassic dwarflinkerparallel dwp engine executionengine extensions filecheck frontendatomic frontenddirective frontenddriver frontendhlsl frontendoffloading frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo hipstdpar instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objcopy object objectyaml option orcdebugging orcjit orcshared orctargetprocess passes plugins powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld sandboxir scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support supportlsp symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser telemetry textapi textapibinaryreader transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xray xtensa xtensaasmparser xtensacodegen xtensadesc xtensadisassembler xtensainfo" LLVM_FILECHECK="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" NODE="/node/bin/node" PYTHON="/usr/bin/python3" RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTDOC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" SOURCE_ROOT="/checkout" TARGET="nvptx64-nvidia-cuda" TARGET_EXE_DYLIB_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/nvptx64-nvidia-cuda/lib" __BOOTSTRAP_JOBS="4" __RMAKE_VERBOSE_SUBPROCESS_OUTPUT="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/parallel-reproducible-build/rmake"
stdout: none
--- stderr -------------------------------
command failed at line 25
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/parallel-reproducible-build/temporary-directory:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/bootstrap-tools/x86_64-unknown-linux-gnu/release/build/run_make_support/de791e679a8f54a5/out:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/parallel-reproducible-build/temporary-directory" "static-muts-issue-140413.rs" "-Zthreads=50" "-o" "static-muts-issue-140413.ptx" "--target=nvptx64-nvidia-cuda"
output status: `exit status: 1`
=== STDOUT ===



=== STDERR ===
error[E0463]: can't find crate for `std`
  |
  = note: the `nvptx64-nvidia-cuda` target may not support the standard library
  = note: `std` is required by `<unknown>` because it does not declare `#![no_std]`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

error: cannot resolve a prelude import

error: cannot find macro `assert_eq` in this scope
##[error]  --> static-muts-issue-140413.rs:18:9
   |
18 |         assert_eq!(*INT_RAW, 2);
   |         ^^^^^^^^^

error: cannot find macro `assert_eq` in this scope
##[error]  --> static-muts-issue-140413.rs:16:9
   |
16 |         assert_eq!(TEST[0], 2);
   |         ^^^^^^^^^

error: `#[panic_handler]` function required, but not found

error: aborting due to 5 previous errors

@rust-bors

rust-bors Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

⌛ Testing commit 701c061 with merge 0d0c275...

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

rust-bors Bot pushed a commit that referenced this pull request Aug 28, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #160170 (Refactored docs for `std::fs::set_permissions_nofollow` + fix BSD-based systems to use fchmodat with AT_SYMLINK_NOFOLLOW flag)
 - #160594 (attach global target features to module-level assembly)
 - #161858 (fix ICE in generic_const_parameter_types with inherents)
 - #161353 (Add test for parallel compiler reproducible build)
 - #161377 ([bootstrap] Don't reverse the order of dylib search path entries)
 - #161804 (Document PartialOrd behavior for Option<T> where T: PartialOrd)
 - #161865 (loongarch: support passing `u128`/`i128` to inline assembly)
 - #161877 (Do not load macro metadata for local definitions in rustdoc)
 - #161880 (fix rustc_lint_defs doctest issues)
 - #161883 (better deal with internal features being injected into doctests)
 - #161887 (std: uefi: fix File::seek returning the EOF sentinel)
 - #161897 (Reject contract attributes without arguments)
 - #161909 (Report the configured Polonius default in -Z help)
 - #161910 (Add rustdoc-html regression test for generated macro)
 - #161914 (Retroactively add relnotes for `bool::{ok_or,ok_or_else}` (1.98.0))
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r-

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

rust-bors Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

Auto build was cancelled due to unapproval. Cancelled workflows:

View changes since this unapproval

@rust-bors

rust-bors Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

PR #161353, which is a member of this rollup, was 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 Aug 28, 2026
@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 28, 2026
@rust-bors

rust-bors Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 5250bb5 failed: CI. Failed jobs:

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-run-make Area: port run-make Makefiles to rmake.rs rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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-release Relevant to the release subteam, 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.