Commit Graph

317260 Commits

Author SHA1 Message Date
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
Laurențiu Nicola e9ec12a225 Fix postcard test too 2026-02-03 10:23:35 +02: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
Tshepang Mbambo ed50cc909a I do not expect there will be any confusion 2026-02-03 00:10:50 +02:00
Tshepang Mbambo 06d17c0d3b use convenient notation, as seen in bootstrap.example.toml 2026-02-03 00:10:22 +02:00
Tshepang Mbambo 5143080050 some improvements 2026-02-02 23:38:03 +02:00
Tshepang Mbambo 6169f2e484 sembr src/effects.md 2026-02-02 23:27:41 +02:00
Tshepang Mbambo f285d5d060 provide the full path 2026-02-02 23:27:22 +02:00
Tshepang Mbambo 957f28c9b8 add some pauses 2026-02-02 23:25:33 +02:00
Oscar Bray f599313846 Make parser naming consistent for dump parsers. 2026-02-02 21:19:50 +00:00
Tshepang Mbambo adb3861f98 sembr src/profiling/wpa-profiling.md 2026-02-02 23:18:00 +02:00
Oscar Bray 6b1d4059cb Port rustc_preserve_ub_checks to attr parser. 2026-02-02 21:14:30 +00:00
Tshepang Mbambo 06fe81964e use sentence case for titles
This makes things consistent
2026-02-02 22:26:46 +02:00
Laurențiu Nicola 8fa27e03c0 Also exclude proc-macro-srv-cli from stage 0 tests 2026-02-02 21:12:44 +02:00