Rollup of 6 pull requests#158670
Closed
JonathanBrouwer wants to merge 19 commits into
Closed
Conversation
Clarify that GuardBack initializes arrays from the end. Restore performance note for iter_next_chunk_erased regarding optimization issues.
I copied the impl block from Guard without noticing that Destruct was only there for const contexts. Consumed the suggestion, thanks. Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
…troduced next_chunk_back implementation in IntoIter, updated documentation, and added test cases for DoubleEndedIterator::next_chunk_back
The guard checked `data_len > u16::MAX`, allowing paths far larger than `PathBuffer` (a fixed 16384-element array), which the subsequent single `copy_from` then overflows. Bound against `MAXIMUM_REPARSE_DATA_BUFFER_SIZE` plus header instead, matching the kernel's limit.
Add support for LoongArch LSX and LASX registers in inline assembly by introducing the `vreg` and `xreg` register classes, along with their associated vector types and operand modifiers. The new register classes are gated behind the `asm_experimental_reg` feature. Also model the overlap between FPU, LSX, and LASX registers so register conflict checking works correctly for aliased registers.
Add UI tests for LoongArch LSX/LASX inline asm registers, including target-feature gating and overlap diagnostics between `fN`, `vrN`, and `xrN` registers.
Add assembly tests for LoongArch inline asm register modifiers. Verify that the `w` and `u` modifiers correctly select LSX and LASX register views for `freg`, `vreg`, and `xreg` operands and produce the expected register names in the generated assembly.
Change HirId to its parent item LocalDefId.
…xt_chunk_back, r=aapoalas Implement `DoubleEndedIterator::next_chunk_back` This PR builds off on @vinDelphini's [PR](rust-lang#151668) on introducing `DoubleEndedIterator::next_chunk_back` (which will be used in a follow up PR to optimize `ArrayChunks::try_rfold` once merged). This was in the works since late Jan and I thought to pick it up and get this over the finish line as vinDelphini has been away from the PR for a couple of months. I've made sure to pull from vinDelphini's branch to keep him authored on the commits he made. Other things introduced from this PR is specialization like done for `Iterator::next_chunk`, constifying some stuff, making a custom `DoubleEndedIterator::next_chunk_back` for `IntoIter` (since it also has a custom impl of `Iterator::next_chunk`), and a bunch of tests mirroring that of `Iterator::next_chunk`. There's no tracking issue for this yet, but the ACP for this introduction is [here](rust-lang/libs-team#734). I'll create the tracking issue for this soon. ---- Actually, can we have `DoubleEndedIterator::next_chunk_back` underneath [`Iterator::next_chunk` tracking issue](rust-lang#98326)?
…arksonn std: fix stack buffer overflow in Windows junction_point The guard checked `data_len > u16::MAX`, allowing paths far larger than `PathBuffer` (a fixed 16384-element array), which the subsequent single `copy_from` then overflows. Bound against `MAXIMUM_REPARSE_DATA_BUFFER_SIZE` plus header instead, matching the kernel's limit.
std: use `OnceLock` for SGX environment variable storage The SGX environment code predates the existence of `OnceLock` and `AtomicPtr` and consequently violates strict provenance. By using `OnceLock` we can remove all the `unsafe` code (except for the `unsafe` in the function signatures, that's required by other platforms). CC @jethrogb @raoulstrackx @aditijannu
…d, r=aapoalas
Implement `ptr::{read,write}_unaligned` via `repr(packed)`
We already support doing unaligned reads & writes via `repr(packed)` fields, so this just uses that support from the backend rather than needing to thinks about `memcpy` and `intrinsics::forget` and such.
Turns out in codegen this ends up essentially identical because the packed type read gets `BackendRepr::Memory` and thus the read/write of the packed type *is* an `align 1` memcpy, just like the library code before this PR. But doing this gives much simpler MIR and rust-lang#158291 will make it better than the previous version by not needing to emit the `memcpy` at all for things like `read_unaligned::<u32>`.
First commit are some tests that pass on master; Second commit changes the implementation and shows the corresponding test changes.
r? libs
…esleywiser Change `adjust_ident_and_get_scope` arg to `LocalDefId` Addresses a FIXME. Change a HirId to its owner LocalDefId.
rustc_target/asm: add LoongArch LSX/LASX inline asm register support Add support for LoongArch LSX and LASX registers in inline assembly by introducing the `vreg` and `xreg` register classes, along with their associated vector types and operand modifiers. The new register classes are gated behind the `asm_experimental_reg` feature. Also model the overlap between FPU, LSX, and LASX registers so register conflict checking works correctly for aliased registers.
Contributor
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 1, 2026
Rollup of 6 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-2
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 1, 2026
…uwer Rollup of 6 pull requests Successful merges: - #156737 (Implement `DoubleEndedIterator::next_chunk_back`) - #158147 (std: fix stack buffer overflow in Windows junction_point) - #158180 (std: use `OnceLock` for SGX environment variable storage) - #158427 (Implement `ptr::{read,write}_unaligned` via `repr(packed)`) - #158531 (Change `adjust_ident_and_get_scope` arg to `LocalDefId`) - #158364 (rustc_target/asm: add LoongArch LSX/LASX inline asm register support)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for ffe100d failed: CI. Failed job:
|
Contributor
|
This pull request was unapproved due to being closed. |
Contributor
|
💔 Test for 51cf4eb failed: CI. Failed jobs:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
DoubleEndedIterator::next_chunk_back#156737 (ImplementDoubleEndedIterator::next_chunk_back)OnceLockfor SGX environment variable storage #158180 (std: useOnceLockfor SGX environment variable storage)ptr::{read,write}_unalignedviarepr(packed)#158427 (Implementptr::{read,write}_unalignedviarepr(packed))adjust_ident_and_get_scopearg toLocalDefId#158531 (Changeadjust_ident_and_get_scopearg toLocalDefId)r? @ghost
Create a similar rollup