Commit graph

316950 commits

Author SHA1 Message Date
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
ltdk
28feae0c87 Move bigint helper tracking issues 2026-02-02 18:45:26 -05:00
Ralf Jung
6490e0ecb5 stabilize ptr_as_ref_unchecked 2026-02-02 19:47:32 +01:00
Jorge Aparicio
bdd19d0db3 clarity that the neon extension is present 2026-02-02 15:13:38 +01:00
mejrs
aef8217943 Pass Recovery down to rustc_parse's Parser 2026-02-02 15:01:34 +01:00
mejrs
30ae46fab1 Use rustc_parse's Recovery instead of a boolean 2026-02-02 15:01:32 +01:00
Ritik Chahar
8476e893e7
Update min-llvm-version: 22
Co-authored-by: Nikita Popov <github@npopov.com>
2026-02-02 16:47:09 +05:30
Alan Egerton
5aba6b1635
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.
2026-02-02 10:57:54 +00:00
ritik chahar
6176945223 fix: remove space for tidy and only for x86_64 2026-02-02 16:05:08 +05:30
ritik chahar
0830a5a928 fix: add min-llvm-version 2026-02-02 15:44:50 +05:30
ritik chahar
95ac5673ce Fix SLP vectorization test CHECK patterns 2026-02-02 15:38:26 +05:30
bors
f60a0f1bcc Auto merge of #151820 - petrochenkov:packhyg3, r=nnethercote
resolve: Use `IdentKey` in `resolve_ident_in_scope_set`

Follow up to https://github.com/rust-lang/rust/pull/151550, implements https://github.com/rust-lang/rust/pull/151550#issuecomment-3792971456.

r? @nnethercote
2026-02-02 08:25:12 +00:00
bors
a60d12cbcc Auto merge of #151971 - Zalathar:rollup-KwKpKLY, r=Zalathar
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#151756 (Avoid miri error in `slice::sort` under Stacked Borrows)
 - rust-lang/rust#147400 (TryFrom<integer> for bool)
 - rust-lang/rust#150993 (std: sys: uefi: os: Implement join_paths)
 - rust-lang/rust#151483 (Add regression test for issue rust-lang/rust#138225)
 - rust-lang/rust#151568 (Update hexagon target linker configurations)
 - rust-lang/rust#151725 (Fix outdated Debian Ports ISO reference)
 - rust-lang/rust#151895 (Move UI tests batch)
 - rust-lang/rust#151923 (Fix ICE when projection error reporting sees opaque alias terms)
 - rust-lang/rust#151947 (Include assoc const projections in CFI trait object)
 - rust-lang/rust#151948 (Handle unbalanced delimiters gracefully in make_attr_token_stream)
 - rust-lang/rust#151963 (Add regression test for negative literal in a range of unsigned type)
2026-02-02 04:41:32 +00:00
Zalathar
0cbbe56d84 Work around rustfmt giving up on a large expression 2026-02-02 13:28:09 +11:00
ritik chahar
c64f9a0fc4 Add backlink to issue 2026-02-02 07:38:14 +05:30
Carl Lundin
f3b7a1a9d8 Update documentation for Result::ok()
The term of "discard" is misleading. An error is not discarded but
converted to an `Option::None`.
2026-02-01 18:01:24 -08:00
Stuart Cook
cfdd14d964
Rollup merge of #151963 - mcraeynest:main, r=Kivooeo
Add regression test for negative literal in a range of unsigned type

Simple regression test for rust-lang/rust#136514
2026-02-02 10:28:34 +11:00
Stuart Cook
7fe7cee69c
Rollup merge of #151948 - chenyukang:yukang-fix-149954-tokenstream-ice, r=Kivooeo
Handle unbalanced delimiters gracefully in make_attr_token_stream

Fixes rust-lang/rust#149954
2026-02-02 10:28:34 +11:00
Stuart Cook
d748af936b
Rollup merge of #151947 - mu001999-contrib:fix/151878, r=fmease
Include assoc const projections in CFI trait object

Fixes rust-lang/rust#151878

After https://github.com/rust-lang/rust/pull/150843, projections of trait objects should include assoc consts, but the cfi `trait_object_ty` still include only assoc types. So that we got the ICE `expected 1 projection but got 0`.
2026-02-02 10:28:34 +11:00
Stuart Cook
be3bf8276d
Rollup merge of #151923 - TaKO8Ki:issue-151331-opaque-alias-relate, r=Kivooeo,fmease
Fix ICE when projection error reporting sees opaque alias terms

Fixes rust-lang/rust#151331
2026-02-02 10:28:33 +11:00
Stuart Cook
393ce4ba38
Rollup merge of #151895 - Delta17920:move-ui-tests-batch, r=Kivooeo
Move UI tests batch

moved few tests

r? @Kivooeo
2026-02-02 10:28:33 +11:00
Stuart Cook
f59d2ebf61
Rollup merge of #151725 - zzaekkii:debian-cdimage-ports, r=Noratrieb
Fix outdated Debian Ports ISO reference

### Location (URL)
https://doc.rust-lang.org/rustc/platform-support/m68k-unknown-none-elf.html

<img width="800" alt="image" src="https://github.com/user-attachments/assets/328a032e-c4ff-4f9a-a832-eefe1944e2b8" />

### Summary
The referenced Debian Ports ISO link is outdated and no longer accessible.

This updates the link to the current Debian CD image location so readers can easily find the correct installation media.
2026-02-02 10:28:32 +11:00
Stuart Cook
39e52562fb
Rollup merge of #151568 - androm3da:bcain/hexagon_linker_cfg, r=Noratrieb
Update hexagon target linker configurations

* hexagon-unknown-qurt: Use hexagon-clang from Hexagon SDK instead of rust-lld
* hexagon-unknown-linux-musl: Use hexagon-unknown-linux-musl-clang from the open source toolchain instead of rust-lld.
* hexagon-unknown-none-elf: Keep rust-lld but fix the linker flavor.

rust-lld is appropriate for a baremetal target but for traditional programs that depend on libc, using clang's driver makes the most sense.
2026-02-02 10:28:32 +11:00
Stuart Cook
2cc38ff3fa
Rollup merge of #151483 - ThanhNguyxn:fix/add-test-issue-138225, r=Kivooeo
Add regression test for issue #138225

Adds a regression test for rust-lang#138225.

The compiler used to ICE with `ReferencesError` when compiling code with:
- An undefined type in a struct field
- An async function returning a static reference to that struct
- Optimizations enabled (`-C opt-level=1` or higher)

The bug has been fixed and now correctly reports `E0425: cannot find type`.

Test file: `tests/ui/async-await/ice-static-in-async-fn-issue-138225.rs`
Closes rust-lang/rust#138225
2026-02-02 10:28:31 +11:00
Stuart Cook
512afea218
Rollup merge of #150993 - Ayush1325:uefi-join-path, r=Mark-Simulacrum
std: sys: uefi: os: Implement join_paths

- Tested using OVMF using QEMU.

@rustbot label +O-UEFI
2026-02-02 10:28:31 +11:00
Stuart Cook
e6e2d39136
Rollup merge of #147400 - hkBst:convert-1, r=Mark-Simulacrum
TryFrom<integer> for bool

I noticed the manual TryFrom implementation in [this video from RustConf 2025](https://youtu.be/cOP219vkax8?list=PL2b0df3jKKiRFEuVNk76ufXagOgEJ9sBZ&t=1917) and thought I'd add it.
2026-02-02 10:28:30 +11:00
Stuart Cook
a57663ea65
Rollup merge of #151756 - Voultapher:fix-box-retag-in-sort, r=Mark-Simulacrum
Avoid miri error in `slice::sort` under Stacked Borrows

See comment in code.

Fixes: https://github.com/rust-lang/rust/issues/151728
2026-02-02 10:28:29 +11:00
bors
92ea9b29d1 Auto merge of #150428 - kouhe3:win-af-unix-2, r=Mark-Simulacrum
UnixStream/UnixListener on Windows 

Hi, I re impl this. Hope you test it.
2026-02-01 23:17:22 +00:00
Maarten Craeynest
f490f6420b
Add regression test for issue-136514: Negative literal in unsigned range 2026-02-01 22:49:57 +01:00
bors
57d2fb1366 Auto merge of #138405 - Zoxc:vec-cache-tweaks, r=Mark-Simulacrum
Tweak `VecCache` to improve performance

This has some tweaks to `VecCache` to improve performance.

- It saves a `compare_exchange` in `complete` using the new `put_unique` function.
- It removes bound checks on entries. These are instead checked in the `slot_index_exhaustive` test.
- `initialize_bucket` is outlined and tuned for that.

cc @Mark-Simulacrum
2026-02-01 18:57:12 +00:00
ritik chahar
1c396d24dd Restrict test to x86_64 per reviewer feedback 2026-02-01 22:14:13 +05:30
ritik chahar
0a60bd653d fix: remove trailing newline for tidy 2026-02-01 22:09:05 +05:30
ritik chahar
2292d53b7b Add codegen test for SLP vectorization 2026-02-01 21:41:43 +05:30
bors
8340622e14 Auto merge of #151543 - GuillaumeGomez:more-proc-macro-literal-methods, r=Amanieu
Add new `byte_value` and `char_value` methods to `proc_macro::Literal`

Part of https://github.com/rust-lang/rust/issues/136652.

It adds two more methods to get unescaped `u8` and `char` from `proc_macro::Literal`.

r? @Amanieu
2026-02-01 15:46:27 +00:00
mu001999
990c55801e Include assoc const projections in CFI trait object 2026-02-01 22:45:43 +08:00
Guillaume Gomez
55e3d2206a Improve new proc-macro methods name 2026-02-01 15:05:57 +01:00
yukang
2bab7a02f2 Handle unbalanced delimiters gracefully in make_attr_token_stream 2026-02-01 13:16:32 +00:00
bors
b7fb220865 Auto merge of #151879 - Zoxc:try-mark-rem-arg, r=jdonszelmann
Remove the `dep_node` argument from `try_mark_previous_green`

This removes the `dep_node` argument from `try_mark_previous_green`. I think this makes it clearer that it's unused without debug assertions.
2026-02-01 12:20:52 +00:00
bors
c4dc07385e Auto merge of #151931 - sizmailov:patch-1, r=jdonszelmann
doc: Replace plain text link with md link to cargo-pgo repo

<img width="1324" height="304" alt="image" src="https://github.com/user-attachments/assets/1ee772e3-6880-4fe7-aa14-cfae4ee73b57" />

https://doc.rust-lang.org/beta/rustc/profile-guided-optimization.html#community-maintained-tools
2026-02-01 09:13:11 +00:00
delta17920
a7dea5504b rename various regression tests 2026-02-01 04:09:25 +00:00
Zalathar
b4bf57b7aa Move the fingerprint_style special case into DepKindVTable creation 2026-02-01 14:31:06 +11:00
bors
878374e07f Auto merge of #151937 - Zalathar:rollup-WdVeaxy, r=Zalathar
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#151927 (typeck_root_def_id: improve doc comment)
 - rust-lang/rust#151907 (Rename `QueryResult` to `ActiveKeyStatus`)
 - rust-lang/rust#151928 (ty::context: clean some code a little)
2026-02-01 03:27:21 +00:00