Skip to content

Rollup of 12 pull requests#156267

Open
jhpratt wants to merge 33 commits intorust-lang:mainfrom
jhpratt:rollup-xaL6466
Open

Rollup of 12 pull requests#156267
jhpratt wants to merge 33 commits intorust-lang:mainfrom
jhpratt:rollup-xaL6466

Conversation

@jhpratt
Copy link
Copy Markdown
Member

@jhpratt jhpratt commented May 7, 2026

Successful merges:

r? @ghost

Create a similar rollup

nnethercote and others added 30 commits May 4, 2026 14:29
- Improve a comment.
- Remove unused `[decode]` annotations on some arenas.
- Improve `impl_arena_allocatable_decoder`:
  - Make the first rule more like the second rule.
  - Remove unnecessary brackets.
  - Remove unused support for attributes other than `decode`.
The table names usually match the name of the corresponding query.
The `trait_impl_trait_tys` table is an exception; this commit renames it
`collect_return_position_impl_trait_in_trait_tys` to match the query.
- Remove comment about blanket implementation of `FallibleTypeFolder` --
  it does not exist. (It probably used to.)
- Fix some incorrect name references.
- Fix minor grammatical errors.
- Fix stale comment on `visit_region` -- it was a no-op once, but no
  longer.

LLM disclosure: Claude Code identified these problems with comments when
I asked it to review `fold.rs` and `visit.rs`. I verified the
correctness of the problems and made the changes by hand.
After llvm/llvm-project#195486 , LLVM has explicit handling for null
pointers in simd operations instead of using special handling based on
zeroes.

This causes LLVM with asserts enabled to detect an improperly typed mask
passed to splat (if the output vector does not have i32 elements), and
can cause SIGSEGV in more complex cases with asserts disabled.
- Introduce `HAS_REGIONS`/`has_regions`, which is true if any regions
  are present.
- Add `fold_clauses` to `Shifter` and `RegionFolder` for consistency.
- Simplify `has_type_flags`.
- Remove unnecessary local variables in `HasTypeFlagsVisitor` methods.
- Use `|=` operator in one place.
- Avoid `is_break` in one place for consistency with nearby code.

LLM disclosure: Claude Code suggested these changes when I asked it to
review `fold.rs` and `visit.rs`. I verified the correctness of the
suggestions and made the changes by hand.
Background:
* During this refactor, the Trusty OS was not targeted in the cfg_select
  rust-lang@e259373
also update the test to make sure there's an error
Like we do for other things for better experience in rust-analyzer.

It's possible now that the `AliasTyKind` and `AliasTermKind` contains the DefId.

It does require a few `try_into().unwrap()`s since in the solver's `consider_X_candidate()` only get an untyped `DefId`. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf.
This commit updates the documentation for WASI targets in the rustc book
to mention a minimum version of wasi-sdk that's required.

Closes 155971
…trochenkov

Fewer global node_id_to_def_id lookups

Several of these are unnecessary if we track the `LocalDefId` together with the `NodeId`. We can't remove the `NodeId` entirely, as it is needed for lints, but it's a useful refactoring for splitting node_id_to_def_id into a per-owner table in the future

r? @petrochenkov
…isDenton

windows/time: avoid being too close to 0

Fixes rust-lang#156142 (but only for Windows -- should we still track it for non-tier-1-platforms?)
… r=mejrs

Deny warnings in the test for crates that are available on stable

We've got a couple of crates, like `rustc_type_ir` that have parts disabled on stable. I believe part of this is so, for example, rust-analyzer can use bits of the compiler. We previously allowed warnings here, and I ran into one. This denies warnings in the test that compiles these stable crates (I chose not to on the crate itself, so you don't *constantly* run into the warnings if you have turned that off in `config.toml`). This test doesn't run by default, but it does run in CI.
Use special DefIds for aliases

Renewal of rust-lang#155025, after `AliasTermKind` was also ported.

Like we do for other things for better experience in rust-analyzer.

It's possible now that the `AliasTyKind` and `AliasTermKind` contains the DefId.

It does require a few `try_into().unwrap()`s since in the solver's `consider_X_candidate()` only get an untyped `DefId`. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf. Should I try to pursue that?

r? lcnr
…affleLapkin

Fold/visit tweaks

Details in individual commits.

r? @WaffleLapkin
… r=Zalathar

Metadata macro/query cleanups

Details in individual commits.

r? @Zalathar
llvm: Use correct type for splat mask

After llvm/llvm-project#195486 , LLVM has explicit handling for null pointers in simd operations instead of using special handling based on zeroes.

This causes LLVM with asserts enabled to detect an improperly typed mask passed to splat (if the output vector does not have i32 elements), and can cause SIGSEGV in more complex cases with asserts disabled.

@rustbot label: +llvm-main

r? @durin42
… r=oli-obk

Refactor `Type::size` field to `TypeId::size` method for `type_info`

Tracking issue rust-lang#146922

r? @oli-obk
…ison

Add Trusty OS to the generic error implementation.

Background:
* During this refactor, the Trusty OS was not targeted in the cfg_select: rust-lang@e259373

r? @randomPoison
jhpratt added 3 commits May 7, 2026 02:12
…ywiser,jieyouxu

compiletest: prevent directives from having multiple revisions

Right now, a compiletest directive like `//@ [foo,bar] compile-flags: -Z hello` is accepted. While it looks similar to a `//[foo,bar]` error annotation matching multiple revisions, it will instead model a directive for a single revision named `foo,bar` and not for two revisions. Slightly inconsistent/confusing.

I don't know that it's common enough to make bigger changes to support it fully (`miri`'s test harness seems to support that use-case), but since I hit that today, this PR prevents that case for now. Otherwise, I think we'd have to turn all uses of `line_directive` as possibly creating multiple line directives, one per revision, etc.

Such a directive will now yield an error, with a best-effort suggestion to split it into multiple single-revision directives:

```
multiple revisions aren't supported yet in `//@ [foo,bar] compile-flags: -Z hello`, split them like
//@ [foo]: compile-flags: -Z hello
//@ [bar]: compile-flags: -Z hello
```
…n, r=Kivooeo

Move tests coercion

Hi, I have moved some tests that belong in the coercion folder. Please take out time to review
r? @Kivooeo
…ieyouxu

Document wasi-sdk minimum versions for WASI targets

This commit updates the documentation for WASI targets in the rustc book to mention a minimum version of wasi-sdk that's required.

Closes rust-lang#155971
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 7, 2026
@rustbot rustbot added A-compiletest Area: The compiletest test runner 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 A-testsuite Area: The testsuite used to check the correctness of rustc 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels May 7, 2026
@jhpratt
Copy link
Copy Markdown
Member Author

jhpratt commented May 7, 2026

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 7, 2026

📌 Commit f84a2cd 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 May 7, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 7, 2026

⌛ Testing commit f84a2cd with merge c2705f8...

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

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

Successful merges:

 - #156173 (Fewer global node_id_to_def_id lookups)
 - #156177 (windows/time: avoid being too close to 0)
 - #155961 (Deny warnings in the test for crates that are available on stable)
 - #155981 (Use special DefIds for aliases)
 - #156130 (Fold/visit tweaks)
 - #156131 (Metadata macro/query cleanups)
 - #156202 (llvm: Use correct type for splat mask)
 - #156223 (Refactor `Type::size` field to `TypeId::size` method for `type_info`)
 - #156227 (Add Trusty OS to the generic error implementation.)
 - #156237 (compiletest: prevent directives from having multiple revisions)
 - #156241 (Move tests coercion)
 - #156258 (Document wasi-sdk minimum versions for WASI targets)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner 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 A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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. 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.