Skip to content

Rustc pull update#2799

Merged
tshepang merged 113 commits intomainfrom
rustc-pull
Mar 18, 2026
Merged

Rustc pull update#2799
tshepang merged 113 commits intomainfrom
rustc-pull

Conversation

@workflows-rustc-dev-guide
Copy link

Latest update from rustc.

sayantn and others added 30 commits January 5, 2026 14:17
…e-tests

Use a generic type to implement SIMD types in `core_arch::simd` and avoid `unsafe fn` in more tests
Configure flycheck using workspace.discoverConfig
Fix not disable string escape highlights
feat: Allow rust paths in symbol search
fix: Disable `unused_variables` and `unused_mut` warnings
…index

Migrate generate_mut_trait_impl assist to use SyntaxEditor
Fix not complete `mut` and `raw` in `&x.foo()`
Fix loses exists guard for move_guard
Fix not applicable on statement for convert_to_guarded_return
Add inherit attributes for extract_function assist
fix: Make `naked_asm!()` always return `!`
Fix false positive precedence in `(2 as i32) < 3`
thread, grid, and block dim/idx can only return non-negative values
internal: Improve docs for discoverConfig
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 94a0cd15f5976fa35e5e6784e621c04e9f958e57
Filtered ref: 1b46aa0fdb1e825363174ce509e40466cc0af416
Upstream diff: rust-lang/rust@004d710...94a0cd1

This merge was created using https://github.com/rust-lang/josh-sync.
The rustc-josh-sync Cronjob Bot and others added 26 commits March 9, 2026 04:45
fix: Allow duplicate assoc type shorthand resolution if it points to the same assoc type
aarch64: use `simd_reduce_{min, max}` on integers
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@90c8906.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
add ACLE random number generation intrinsics
…rtdev,RalfJung

stdarch subtree update

Subtree update of `stdarch` to rust-lang/stdarch@aa3fc33.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
Add the option to run UI tests with the parallel frontend

This PR adds two arguments for tests:

1. `--parallel-frontend-threads`: specify `-Zthread` to compile test case (currently UI tests only)
2. `--iteration-count`: the number of times to run each test

Also, due to the non-deterministic diagnostic orders and cycle errors, this PR adds the directive `//@ ignore-parallel-frontend` to ignore tests with cycle error when the parallel-frontend is enabled (by `--parallel-frontend-threads`) and enables `//@ compare-output-by-lines` by default.

Context: [#t-compiler/parallel-rustc > Add the parallel front-end test suite @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fparallel-rustc/topic/Add.20the.20parallel.20front-end.20test.20suite/near/578781369)

This PR should work with rust-lang/rust#153797 together.
Fix non-module `parent_module` in stripped cfg diagnostics

Fixes rust-lang/rust#153848

Old `parent_module` is from the `parent_node` in `append_stripped_cfg_item`, it cannot be assumed that it points to a real module. So call `expect_module` on it will cause ICE.

The first commit rename `parent_module` to `parent_scope`, and the second using `get_nearest_non_block_module` to find the nearest `module` of `parent_scope` in `find_cfg_stripped`, which should be the correct `parent_module`.
Tweak wording of failed predicate in inference error

Special case message talking about `Predicate` that couldn't be satisfied when in inference errors so that we don't say "cannot satisfy `_: Trait`" and instead say "type must implement `Trait`".
Flip "region lattice" in RegionKind doc comment

If we assume that references take their region covariantly, and use that to define the subtyping relationship of regions, `'empty` is ⊤ (top) and `'static` is ⊥ (bottom), and that `'a <: 'b` is defined as `'a >= 'b`. However, the RegionKind doc comment's "region lattice" had `'static` at Top. While this is perhaps technically correct (a so-called "region lattice" is not a "type lattice"), it confused me a lot, and took me half an hour to be like "no, ok, I *do* understand things correctly, this region lattice is just flipped from the subtype lattice". Seems better to just have them be the same!

I also took the opportunity to rewrite some parts of the comment with notes that would have helped me when starting out.

Bikesheds welcome (as long as they don't go on forever)!

For context: the comment "`'static` is Top" was [written in 2013](rust-lang/rust@a896440#diff-8780054cdf09361c4ac2540c7f544ecfdc52a9e610822aabb8bcd2964affcb1cR430), before there was a [discussion in 2014](rust-lang/rust#15699) that clarified that references take their regions covariantly, and `'a <: 'b` is defined as `'a >= 'b`.

See also Zulip thread: https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/RegionKind.20rustc.20doc.20comment
…t-various, r=marcoieni

Fix LegacyKeyValueFormat report from docker build: various

Part of rust-lang/rust#152305

r? @marcoieni
remove concept of soft-unstable features

Implements rust-lang/compiler-team#972

@rust-lang/libs-api last chance to speak up before this feature is gone :)

Fixes rust-lang/rust#153572
Fixes rust-lang/rust#64266
…thercote

Fix hypothetical ICE in `variances_of`

A cleanup based on rust-lang/rust#153694.

~~This PR changes panic messages in `fn_sig`'s `value_from_cycle_error` to more fitting ones.~~ Also this PR makes `variances_of`'s `value_from_cycle_error` to utilize new query key argument instead of extracting it from `CycleError`.

Closes rust-lang/rust#127971

r? @nnethercote
…ross35

test `classify-runtime-const` for `f16`

tracking issue: rust-lang/rust#116909

r? tgross35
Point at unit structs on foreign crates in type errors when they are the pattern of a binding

Consts and unit structs in patterns can be confusing if they are mistaken for new bindings. We already provide some context for unit structs and consts that come from the current crate, we now also point at those from foreign crates, and we properly skip cases where the pattern has type parameters which can't be confused with a new binding. So not suggest making a new binding when other suggestions are already emitted, as the likelihood of the other suggestions being what the user intended is higher. Make new binding suggestion verbose.

Fix rust-lang/rust#129792.

```
error[E0308]: mismatched types
 --> fi.rs:8:9
  |
1 | struct percentage;
  | ----------------- unit struct defined here
...
8 |     let percentage = 4i32;
  |         ^^^^^^^^^^   ---- this expression has type `i32`
  |         |
  |         expected `i32`, found `percentage`
  |         `percentage` is interpreted as a unit struct, not a new binding
help: introduce a new binding instead
  |
8 -     let percentage = 4i32;
8 +     let other_percentage = 4i32;
  |
```
…anBrouwer

improve `#[track_caller]` invalid ABI error

Niche but we can provide more context by emitting the error earlier.
Fix minor kasan bugs

Fixes a few minor bugs discovered during rust-lang/rust#153049.
…petrochenkov

Small report_cycle refactor

I think this doesn't require any explanation.
…uwer

Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#153972 (stdarch subtree update)
 - rust-lang/rust#153801 (Add the option to run UI tests with the parallel frontend)
 - rust-lang/rust#153959 (Fix non-module `parent_module` in stripped cfg diagnostics)
 - rust-lang/rust#153967 (Tweak wording of failed predicate in inference error)
 - rust-lang/rust#152968 (Flip "region lattice" in RegionKind doc comment)
 - rust-lang/rust#153531 (Fix LegacyKeyValueFormat report from docker build: various)
 - rust-lang/rust#153622 (remove concept of soft-unstable features)
 - rust-lang/rust#153709 (Fix hypothetical ICE in `variances_of`)
 - rust-lang/rust#153884 (test `classify-runtime-const` for `f16`)
 - rust-lang/rust#153894 (Point at unit structs on foreign crates in type errors when they are the pattern of a binding)
 - rust-lang/rust#153920 (improve `#[track_caller]` invalid ABI error)
 - rust-lang/rust#153946 (dissolve `tests/ui/cross`)
 - rust-lang/rust#153965 (Fix minor kasan bugs)
 - rust-lang/rust#153991 (Small report_cycle refactor)
Emit ForbiddenBound fatally if meeting complex bound



Fixes rust-lang/rust#149695

---

Bounds in binders are denied, hir items won't contain and index them. But nested items in the bounds will still be lowered to hir. And their parents, i.e., the block in bounds is not in hir. So that ICE happens when error handling requires visiting hir parents.

~~This PR collects hirless def ids and skips them when iterating parents.~~

~~This PR checks such bounds used in higher ranked binders and emit error `ForbiddenBound` when parsing. And make sure no such bounds appear in hir.~~

This PR emits this error fatally if meeting complex bound.
This updates the rust-version file to 91021ccc790478a1a89c003e7d32b8d155ae6aae.
@rustbot
Copy link
Collaborator

rustbot commented Mar 18, 2026

Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using r? rustc-dev-guide or r? <username>.

@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Mar 18, 2026
@tshepang tshepang merged commit afae2e5 into main Mar 18, 2026
1 check passed
@rustbot rustbot removed the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.