Repository navigation
Rollup of 5 pull requests - #165866
Closed
JonathanBrouwer wants to merge 18 commits into
Closed
Rollup of 5 pull requests#165866JonathanBrouwer wants to merge 18 commits into
JonathanBrouwer wants to merge 18 commits into
Conversation
Signed-off-by: Xubai Wang <xubaiwwj@gmail.com>
Aggregates of up to 64 bits were always cast to an i32/i64, even when
no argument registers were left. LLVM then placed the i64 in an
8-byte aligned stack slot, but the ABI (section 5.1) says stack arguments
follow the normal alignment rules of the type, so a `{ i32, i32 }` must
be 4-aligned.
Track the remaining arg regs. When an aggregate no longer fits in
registers, pass it by value on the stack with its natural alignment.
Aggregates passed or returned in registers now use the smallest
type.
after some discussion, we decided we want view types to be `!Sized`, at least at the beginning. this commit updates the test suite so that view types are not passed by value anymore.
this commit is quite big because we want to always exhaustively match on all the `TyKind` variants. none of the `unimplemented!()` is reachable because we don't *actually* lower view types (yet!).
/!\ the test suite is has not been updated /!\ the `unreachable!()`s added previously are suddenly reached, triggering literally all the view types test suite to ICE. this is fixed by the next commit.
…hread, r=petrochenkov Explicitly drop job server helper thread An adaptation of an LLM patch that was generated in https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Interaction.20of.20Cargo.20jobserver.20tests.20and.20parallel.20frontend/with/639482582. The original patch consisted from two fixes: explicit drop of a helper thread and additional logic for job server token request counting. This PR implements only the explicit drop part as I don't see how additional requests counting logic should help the issue. This reworks rust-lang#165676, as the [rationale](https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Interaction.20of.20Cargo.20jobserver.20tests.20and.20parallel.20frontend/near/639152114) behind explicit drop of a helper thread seems reasonable for me: > From my rough understanding, while helper is handling a token, its upgrade() is often the last strong ref I guess. So, when run_in_thread_pool_with_globals returns and rustc exits, the token may still be in helper's hands. This fix didn't fail after several launches in rust-lang#165506 and locally. r? @petrochenkov
replace `TypingEnv::post_analysis()` with `mir::Body::typing_env()` This PR fixes the correspondence between typing modes and MIR phases so that some passes don't have to fix that inconsistency themselves. Similar to rust-lang#163745 We should discourage constructing a typing env by hand when it can be derived from context. This simplifies reasoning and reduces the mistake of not resetting rigidness markers across typing envs. r? lcnr
…ates, r=folkertdev
hexagon: pass small aggregates on the stack when registers run out
Aggregates of up to 64 bits were always cast to an i32/i64, even when no argument registers were left. LLVM then placed the i64 in an 8-byte aligned stack slot, but the ABI (section 5.1) says stack arguments follow the normal alignment rules of the type, so a `{ i32, i32 }` must be 4-aligned.
Track the remaining arg regs. When an aggregate no longer fits in registers, pass it by value on the stack with its natural alignment. Aggregates passed or returned in registers now use the smallest type.
…risDenton
Mention width limit panic in fmt doc
`format!` will panic if dynamic width exceeds 65535. Mention this in the doc.
```rust
fn main() {
println!("Hello {:width$}!", "x", width = 65536);
}
// thread 'main' (2688852) panicked at src/main.rs:2:5:
// Formatting argument out of range
// note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
…g, r=oli-obk view-types: lower view types from HIR
Member
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 12, 2026
Rollup of 5 pull requests try-job: dist-various-1 try-job: test-various try-job: test-x86_64-gnu-aux try-job: test-x86_64-msvc-1 try-job: test-aarch64-apple-1 try-job: test-aarch64-apple-2 try-job: test-x86_64-mingw-1 try-job: test-i686-msvc try-job: test-armhf-gnu try-job: test-x86_64-gnu-llvm-22-3 try-job: test-aarch64-msvc-2
Contributor
|
⌛ Testing commit dd623bc with merge 44457cc... Workflow: https://github.com/rust-lang/rust/actions/runs/43238362417 |
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 12, 2026
…uwer Rollup of 5 pull requests Successful merges: - #165854 (Explicitly drop job server helper thread) - #164077 (replace `TypingEnv::post_analysis()` with `mir::Body::typing_env()`) - #165305 (hexagon: pass small aggregates on the stack when registers run out) - #165417 (Mention width limit panic in fmt doc) - #165565 (view-types: lower view types from HIR)
Contributor
|
PR #165565, which is a member of this rollup, changed its commit SHA to This rollup was thus unapproved due to being closed. Auto build was cancelled due to push. Cancelled workflows: |
Contributor
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:
TypingEnv::post_analysis()withmir::Body::typing_env()#164077 (replaceTypingEnv::post_analysis()withmir::Body::typing_env())r? @ghost
Create a similar rollup