Commit Graph

317275 Commits

Author SHA1 Message Date
Alex Crichton 8e26944f62 Update wasi-sdk used in CI/releases
This is similar to prior updates such as 149037 in that this is just
updating a URL. This update though has some technical updates
accompanying it as well, however:

* The `wasm32-wasip2` target no longer uses APIs from WASIp1 on this
  target, even for startup. This means that the final binary no longer
  has an "adapter" which can help making instantiation of a component a
  bit more lean.

* In 147572 libstd was updated to use wasi-libc more often on the
  `wasm32-wasip2` target. This uncovered a number of bugs in
  wasi-libc such as 149864, 150291, and 151016. These are all fixed in
  wasi-sdk-30 so the workarounds in the standard library are all
  removed.

Overall this is not expected to have any sort of major impact on users
of WASI targets. Instead it's expected to be a normal routine update to
keep the wheels greased and oiled.
2026-02-05 15:04:55 -08:00
bors 55407b8cdb Auto merge of #151853 - Zalathar:feed-vtable, r=oli-obk
Use the query vtable in `query_feed` plumbing

The `query_feed` function needs to be able to do two important things with (erased) query values: hash them, and debug-print them.

Both of those are things that the query's vtable already knows how to do. So by passing in a vtable to `query_feed`, we can give it a nicer signature, avoid having to unerase values in the function itself, and clean up some caller-side code as well.
2026-02-03 14:09:42 +00:00
bors 79a1e77fe3 Auto merge of #152035 - Zalathar:rollup-Ur7QmrJ, r=Zalathar
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#152008 (`rust-analyzer` subtree update)
 - rust-lang/rust#151109 (fN::BITS constants for feature float_bits_const)
 - rust-lang/rust#151976 (Rename `collect_active_jobs` to several distinct names)
 - rust-lang/rust#151691 (compiletest: Don't assume `aux-crate` becomes a `*.so` with `no-prefer-dynamic`)
 - rust-lang/rust#151919 (fix: Make `--color always` always print color with `--explain`)
 - rust-lang/rust#152017 (Remove `with_no_trimmed_paths` use in query macro)
 - rust-lang/rust#152028 (Convert to inline diagnostics in `rustc_driver_impl`)
2026-02-03 10:59:42 +00:00
Stuart Cook b0552e6077 Rollup merge of #152028 - JonathanBrouwer:diag_driver_impl, r=jdonszelmann
Convert to inline diagnostics in `rustc_driver_impl`

Converts a crate for rust-lang/rust#151366
This PR is almost completely autogenerated by a hacky script I have locally :)
2026-02-03 21:58:42 +11:00
Stuart Cook 04ebb635a4 Rollup merge of #152017 - Zoxc:query-rem-with_no_trimmed_paths, r=lqd
Remove `with_no_trimmed_paths` use in query macro

We already use `with_no_trimmed_paths!` when calling query descriptors so the extra call generated by the macro is not needed.
2026-02-03 21:58:41 +11:00
Stuart Cook 63303aaa65 Rollup merge of #151919 - JayanAXHF:fix_color_always, r=nnethercote
fix: Make `--color always` always print color with `--explain`

Fixes rust-lang/rust#151643.

This changes the behaviour of `handle_explain` in `rustc_driver_impl` to always output color when the `--color always` flag is set.

r? @tgross35
2026-02-03 21:58:41 +11:00
Stuart Cook 6d064d9b90 Rollup merge of #151691 - Enselic:dylib-only-for-prefer-dynamic-v2, r=jdonszelmann
compiletest: Don't assume `aux-crate` becomes a `*.so` with `no-prefer-dynamic`

Since it does not make sense to do so. If someone prefers no dynamic stuff, the last thing they want to look for is an .so file. Also add a regression test. Without the fix, the test fails with:

    error: test compilation failed although it shouldn't!
    --- stderr -------------------------------
    error: extern location for no_prefer_dynamic_lib does not exist: .../auxiliary/libno_prefer_dynamic_lib.so
      --> .../no-prefer-dynamic-means-no-so.rs:9:5
       |
    LL |     no_prefer_dynamic_lib::return_42();
       |     ^^^^^^^^^^^^^^^^^^^^^

### Needed by:
-  https://github.com/rust-lang/rust/pull/150591 because of https://github.com/rust-lang/rust/issues/151271. But IMHO this PR makes sense on its own.

### Must wait for:
- [x] https://github.com/rust-lang/rust/pull/151695
2026-02-03 21:58:40 +11:00
Stuart Cook f69082d0e7 Rollup merge of #151976 - Zalathar:collect-active-jobs, r=nnethercote
Rename `collect_active_jobs` to several distinct names

Key renames:
- Function `collect_active_jobs` → `collect_active_jobs_from_all_queries` (method in trait `QueryContext`)
- Constant `COLLECT_ACTIVE_JOBS` → `PER_QUERY_GATHER_ACTIVE_JOBS_FNS` (list of per-query function pointers)
- Function `collect_active_jobs` → `gather_active_jobs` (per-query function in `query_impl::$name`)
- Function `collect_active_jobs` → `gather_active_jobs_inner` (method in `QueryState`)
  - Giving these four things distinct names makes it a lot easier to tell them apart!
  - The switch from “collect” (all queries) to “gather” (single query) is intended to make the different parts a bit more memorable and searchable; I couldn't think of a more natural way to express this distinction so I settled for two different synonyms.

There should be no change to compiler behaviour.

r? nnethercote (or compiler)
2026-02-03 21:58:40 +11:00
Stuart Cook 37ece9cf9b Rollup merge of #151109 - tyhdefu:float_bits_const, r=tgross35
fN::BITS constants for feature float_bits_const

Also enables the feature for compiler_builtins as otherwise this causes a warning and conflicts with the Float extension trait.

---
Implementation for rust-lang/rust#151073

Feature flag: `#![feature(float_bits_const)]`

Note that this is likely to conflict with some extension traits, as it has with compiler builtins. However, assuming correct values for the constants, they are either `u32`, the same type, which should not cause a problem (as shown by enabling the feature for compiler_builtins), or a different type (e.g. `usize`), which should cause a compiler error. Either way this should never change behaviour unless the extension trait implemented an incorrect value.

Also note that it doesn't seem to be possible to put multiple unstable attributes on an item, so `f128::BITS` and `f16::BITS` are gated behind the feature flags for those primitives, rather than `#![feature(float_bits_const)]`
2026-02-03 21:58:39 +11:00
Stuart Cook c4a254f7f3 Rollup merge of #152008 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/7cb789d98202b88c34e9710e53f8aeac0fa5096e.

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

r? @ghost
2026-02-03 21:58:38 +11:00
Zalathar e58538c552 Rename collect_active_jobs to several distinct names 2026-02-03 20:10:22 +11:00
Laurențiu Nicola e9ec12a225 Fix postcard test too 2026-02-03 10:23:35 +02:00
Jonathan Brouwer c07f10c2c1 Convert to inline diagnostics in rustc_driver_impl 2026-02-03 08:51:31 +01:00
Martin Nordholts f14e3ee38f compiletest: Don't assume aux-crate becomes a *.so with no-prefer-dynamic
Since it does not make sense to do so. If someone prefers no dynamic
stuff, the last thing they want to look for is an `.so` file. Also add a
regression test. Without the fix, the test fails with:

    error: test compilation failed although it shouldn't!
    --- stderr -------------------------------
    error: extern location for no_prefer_dynamic_lib does not exist: .../auxiliary/libno_prefer_dynamic_lib.so
      --> .../no-prefer-dynamic-means-no-so.rs:9:5
       |
    LL |     no_prefer_dynamic_lib::return_42();
       |     ^^^^^^^^^^^^^^^^^^^^^
2026-02-03 06:00:28 +01:00
bors 46c86aef65 Auto merge of #152025 - jhpratt:rollup-Kxb6k3Y, r=jhpratt
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#151378 (Codegen tests for Arm Cortex-R82)
 - rust-lang/rust#151936 (Move the `fingerprint_style` special case into `DepKindVTable` creation)
 - rust-lang/rust#152018 (Move bigint helper tracking issues)
 - rust-lang/rust#151958 (Add codegen test for SLP vectorization)
 - rust-lang/rust#151974 (Update documentation for `Result::ok()`)
 - rust-lang/rust#151975 (Work around rustfmt giving up on a large expression)
 - rust-lang/rust#151990 (Fix missing unused_variables lint when using a match guard)
 - rust-lang/rust#151995 (stabilize ptr_as_ref_unchecked)
 - rust-lang/rust#151999 (attribute parsing: pass recovery mode to Parser.)
 - rust-lang/rust#152009 (Port rustc_preserve_ub_checks to attr parser)
 - rust-lang/rust#152022 (rustc-dev-guide subtree update)

Failed merges:

 - rust-lang/rust#151968 (Remove `HasDepContext` by merging it into `QueryContext`)
2026-02-03 04:44:02 +00:00
Jacob Pratt 3b8a503eac Rollup merge of #152022 - tshepang:rdg-sync, r=tshepang
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to https://github.com/rust-lang/rustc-dev-guide/commit/4bd728057939aa85c47937a6dd3effa2adf322be.

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

r? @ghost
2026-02-02 23:12:09 -05:00
Jacob Pratt 9e21300b02 Rollup merge of #152009 - Ozzy1423:attrs4, r=JonathanBrouwer
Port rustc_preserve_ub_checks to attr parser

Tracking issue: https://github.com/rust-lang/rust/issues/131229

Port rustc_preserve_ub_checks to attr parser

r? @JonathanBrouwer
2026-02-02 23:12:08 -05:00
Jacob Pratt cbebacda0b Rollup merge of #151999 - mejrs:ignore_nonmeta_v2, r=JonathanBrouwer
attribute parsing: pass recovery mode to Parser.

Fixes https://github.com/rust-lang/rust/issues/151996
2026-02-02 23:12:08 -05:00
Jacob Pratt 55590344ba Rollup merge of #151995 - RalfJung:ptr_as_ref_unchecked, r=jhpratt
stabilize ptr_as_ref_unchecked

FCP passed in rust-lang/rust#122034.

Closes rust-lang/rust#122034.
2026-02-02 23:12:07 -05:00
Jacob Pratt b73b8223d8 Rollup merge of #151990 - eggyal:unused-in-match-with-guard, r=nnethercote
Fix missing unused_variables lint when using a match guard

Within a binding pattern match guard, only real reads of a bound local impact its liveness analysis - not the fake read that is injected.

Fixes rust-lang/rust#151983
r? compiler
2026-02-02 23:12:07 -05:00
Jacob Pratt 4923aec6f2 Rollup merge of #151975 - Zalathar:interface-fmt, r=BoxyUwU
Work around rustfmt giving up on a large expression

- https://github.com/rust-lang/rustfmt/issues/3863

---

In some cases, if rustfmt sees a string literal that is too long for it to comfortably format, it will give up on formatting the entire enclosing expression.

For complex builder expressions, that will prevent auto-formatting for frustratingly large sections of code.

This PR works around a particular occurrence of that phenomenon in `compiler/rustc_interface/src/util.rs`, by splitting a single error message string across multiple lines. This allows rustfmt to successfully auto-format the entire enclosing expression, which is dozens of lines long.

There should be no change to compiler behaviour.
2026-02-02 23:12:06 -05:00
Jacob Pratt 7fd1009ece Rollup merge of #151974 - clundin55:doc-fix, r=jhpratt
Update documentation for `Result::ok()`

The term of "discard" is misleading. An error is not discarded but converted to an `Option::None`.
2026-02-02 23:12:06 -05:00
Jacob Pratt e2c5b89d2a Rollup merge of #151958 - chahar-ritik:add-slp-vectorization-test, r=jieyouxu
Add codegen test for SLP vectorization

close: rust-lang/rust#142519

This PR adds a codegen regression test for rust-lang/rust#142519. A regression in LLVM to fail to auto-vectorize, leading to significant performance loss.

The SLP vectorizer correctly groups the 4-byte operations into <4 x i8> vectors.

The loop state is maintained in SIMD registers (phi <4 x i8>).

The test remains robust across architectures (AArch64 vs x86_64) by allowing flexible store types (i32 or <4 x i8>).
2026-02-02 23:12:05 -05:00
Jacob Pratt b75cdc98ba Rollup merge of #152018 - clarfonthey:bigint-tracking-issues, r=scottmcm
Move bigint helper tracking issues

Closes rust-lang/rust#85532.

This splits the remainder of the `bigint_helper_methods` tracking issue into three issues:

* `signed_bigint_helpers`: rust-lang/rust#151989
* `widening_mul`: rust-lang/rust#152016
* `const_unsigned_bigint_helpers`: rust-lang/rust#152015

Note that the existing stable methods were merged under the `unsigned_bigint_helpers` feature as part of rust-lang/rust#144494.
2026-02-02 23:12:05 -05:00
Jacob Pratt 91a2ec32e3 Rollup merge of #151936 - Zalathar:fingerprint-style, r=petrochenkov
Move the `fingerprint_style` special case into `DepKindVTable` creation

I'm a little bit fuzzy on *precisely* why anonymous queries are treated as having `FingerprintStyle::Opaque`, but I'm pretty confident that baking this special case into the query vtable is equivalent to the current behaviour, while being marginally more efficient.

(I believe this special case comes from anonymous queries not having a fingerprint in the first place, so “opaque” is just there to signal that reconstructing a key is impossible.)
2026-02-02 23:12:04 -05:00
Jacob Pratt c908ea27fd Rollup merge of #151378 - ferrocene:add-cortexr82-testing, r=jdonszelmann
Codegen tests for Arm Cortex-R82

This PR adds checks to the `aarch64v8r-unknown-none` target to verify that if the Cortex-R82 CPU is enabled (with `-Ctarget-cpu=cortex-r82`), that the appropriate additional AArch64 features are enabled.

This is important because Cortex-R82 is (currently) the only processor implementing Armv8-R AArch64 and it implements a number of Armv8 features over and above the baseline for the architecture. Many of these features are of interest to safety-critical firmware development (for example `FEAT_RASv1p1`, which adds support for the *RAS Common Fault Injection Model Extension*) and so we anticipate them being enabled when building such firmware.

We are offering these tests upstream in-lieu of a full Cortex-R82 specific target because we understand the Project has a preference for architecture-baseline targets over CPU-specific targets.

~~This PR builds on and requires https://github.com/rust-lang/rust/pull/150863, but we've pulled them out as a separate PR.~~ That PR has been merged.

## Ownership

This PR was developed by Ferrous Systems on behalf of Arm. Arm is the owner of these changes.
2026-02-02 23:12:04 -05:00
bors 5ac8ecea36 Auto merge of #152006 - JonathanBrouwer:rollup-TXHXPNU, r=JonathanBrouwer
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#149596 (resolve: Report more visibility-related early resolution ambiguities for imports)
 - rust-lang/rust#151695 (compiletest: Support `--extern` modifiers with `proc-macro` directive)
 - rust-lang/rust#151938 (Use `#![feature(adt_const_params)]` for static query flags)
 - rust-lang/rust#151172 (Use default field values in a few more cases)
 - rust-lang/rust#151825 (more float constants)
 - rust-lang/rust#151870 (regression test for alias-relate changes in lub)
 - rust-lang/rust#151872 (Add inline syntax for diagnostic messages)
 - rust-lang/rust#151902 (explain why we dont skip some of this work when there are field projections)
 - rust-lang/rust#151909 (Skip overlapping spans in argument error suggestions)
 - rust-lang/rust#151978 (Query cleanups)
 - rust-lang/rust#151979 (Fix uninitialized UEFI globals in tests)
 - rust-lang/rust#151992 (Port `#[rustc_hidden_type_of_opaque]` to attribute parser)
2026-02-03 01:32:22 +00:00
ltdk 28feae0c87 Move bigint helper tracking issues 2026-02-02 18:45:26 -05:00
Tshepang Mbambo 89799e9be9 Merge pull request #2760 from rust-lang/tshepang-patch-1
use sentence case for titles
2026-02-03 01:21:02 +02:00
Tshepang Mbambo 060ca1f06f Merge pull request #2762 from rust-lang/tshepang/sembr
sembr a few files
2026-02-03 01:14:02 +02:00
Tshepang Mbambo 3ea1571787 reflow 2026-02-03 01:11:26 +02:00
Tshepang Mbambo 06af960fba sounds better as separate sentences 2026-02-03 01:11:26 +02:00
Tshepang Mbambo 809bf7922f sembr src/tests/docker.md 2026-02-03 01:11:26 +02:00
Tshepang Mbambo 0c6e040dad sembr src/profiling.md 2026-02-03 01:04:36 +02:00
Tshepang Mbambo 48760618e8 replace html with markdown 2026-02-03 01:04:36 +02:00
Tshepang Mbambo 8c322fcdb3 sembr src/llvm-coverage-instrumentation.md 2026-02-03 01:04:36 +02:00
Tshepang Mbambo faea3136bb whitespace 2026-02-03 00:53:58 +02:00
Tshepang Mbambo a2fa618551 sembr src/compiler-debugging.md 2026-02-03 00:49:52 +02:00
Tshepang Mbambo 670fec6bbd reflow 2026-02-03 00:49:36 +02:00
Tshepang Mbambo 222e5216a0 sembr src/building/optimized-build.md 2026-02-03 00:46:00 +02:00
Tshepang Mbambo e83ee8a2be missing pause 2026-02-03 00:45:01 +02:00
Tshepang Mbambo d4ff9c8227 less awkward 2026-02-03 00:44:47 +02:00
Tshepang Mbambo 299b429e96 sembr src/building/how-to-build-and-run.md 2026-02-03 00:36:10 +02:00
Tshepang Mbambo 9bafb7744a sembr src/backend/updating-llvm.md 2026-02-03 00:27:12 +02:00
Tshepang Mbambo 616954b0bd whitespace 2026-02-03 00:25:41 +02:00
Tshepang Mbambo b55c621216 reflow 2026-02-03 00:22:44 +02:00
Tshepang Mbambo c305590083 more clean 2026-02-03 00:21:02 +02:00
Tshepang Mbambo b658d1521f a symlink is now helpfully provided 2026-02-03 00:20:22 +02:00
Tshepang Mbambo 4c958e731b this is text with multiple authors 2026-02-03 00:18:37 +02:00
Tshepang Mbambo ca24637a66 sembr src/backend/debugging.md 2026-02-03 00:12:31 +02:00