304255 Commits

Author SHA1 Message Date
Jakub Beránek
2ea8621779
Override GITHUB_ACTIONS=0 for tidy tests 2025-08-25 14:10:44 +02:00
Jakub Beránek
8fa5fc63ba
Do not forward CI configure arguments to distcheck builds 2025-08-25 12:32:13 +02:00
bors
b779120cad Auto merge of #145844 - Zalathar:rollup-4kdll9t, r=Zalathar
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#135761 (Dial down detail of B-tree description)
 - rust-lang/rust#145620 (Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn casts)
 - rust-lang/rust#145788 (Fix attribute target checking for macro calls)
 - rust-lang/rust#145794 (bootstrap.py: Improve CPU detection on NetBSD)
 - rust-lang/rust#145817 (cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype)
 - rust-lang/rust#145820 (raw-dylib-elf: set correct `DT_VERDEFNUM`)
 - rust-lang/rust#145828 (Update `bitflags` to 2.9.3.)
 - rust-lang/rust#145830 (Remove the lifetime from `ExpTokenPair`/`SeqSep`.)
 - rust-lang/rust#145836 (Remove outdated bug comments)
 - rust-lang/rust#145842 (rustc-dev-guide subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-08-25 10:31:32 +00:00
Jakub Beránek
89f9cf31d1
Handle tarballs in x test tidy 2025-08-25 12:06:45 +02:00
Jakub Beránek
a3229e4101
Make x test distcheck more self-contained 2025-08-25 12:03:44 +02:00
Stuart Cook
0119d1611d
Rollup merge of #145842 - tshepang:rdg-sync, r=jieyouxu
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to a03c1efa97.

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

r? `@ghost`
2025-08-25 19:52:24 +10:00
Stuart Cook
a12516f31d
Rollup merge of #145836 - minux-lee:issue-145835, r=RalfJung
Remove outdated bug comments

The related issue https://github.com/rust-lang/rust/issues/74836 was closed.
This PR may close rust-lang/rust#145835. Details are in the issue rust-lang/rust#145835.
2025-08-25 19:52:24 +10:00
Stuart Cook
078bfaa343
Rollup merge of #145830 - nnethercote:TokenKind-unref, r=chenyukang
Remove the lifetime from `ExpTokenPair`/`SeqSep`.

`TokenKind` now impls `Copy`, so we can store it directly rather than a reference.

r? `@chenyukang`
2025-08-25 19:52:23 +10:00
Stuart Cook
eb9e6f4301
Rollup merge of #145828 - nnethercote:bitflags-2.9.3, r=joshtriplett
Update `bitflags` to 2.9.3.

The `bitflags!` macro in the latest release has slightly streamlined codegen. See https://github.com/bitflags/bitflags/pull/458 for details.

r? `@yaahc`
2025-08-25 19:52:22 +10:00
Stuart Cook
488496b3a7
Rollup merge of #145820 - mati865:raw-elf-verdefnum, r=bjorn3
raw-dylib-elf: set correct `DT_VERDEFNUM`

Previously it indicated a single version, regardless of their count.
Observed in: https://github.com/davidlattimore/wild/pull/1041
2025-08-25 19:52:22 +10:00
Stuart Cook
0b672857c4
Rollup merge of #145817 - Zalathar:llvm-bool, r=workingjubilee
cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype

This should be nicer and more type-safe than the old typedef for `c_int`/`i32`.

Using `#[repr(transparent)]` should ensure that it's still ABI-compatible.
2025-08-25 19:52:21 +10:00
Stuart Cook
d89d8a7909
Rollup merge of #145794 - he32:bootstrap-netbsd-fix, r=Kobzol
bootstrap.py: Improve CPU detection on NetBSD

...and add some adaptation of detection for some arm variants.
2025-08-25 19:52:21 +10:00
Stuart Cook
c38bbf5dfe
Rollup merge of #145788 - JonathanBrouwer:proper-fix-for-macro-call-target, r=jdonszelmann
Fix attribute target checking for macro calls

Fixes https://github.com/rust-lang/rust/issues/145779

r? `@jdonszelmann`
2025-08-25 19:52:20 +10:00
Stuart Cook
8a2568a3b6
Rollup merge of #145620 - compiler-errors:fake-dyn-to-dyn, r=lcnr
Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn casts

Fixes https://github.com/rust-lang/rust/issues/141806

When we have an impossible where clause like `dyn Trait<u8>: Sized`, this may make a dyn-to-dyn cast like `dyn Trait<()> -> dyn trait<u8>` to successfully type check as if it were a wide-to-thin ptr cast (discarding metadata):

16ad385579/compiler/rustc_hir_typeck/src/cast.rs (L862-L865)

In borrowck, we are expecting that the only meaningful dyn-to-dyn cast to be a metadata-preserving wide-to-wide ptr cast, which requires that the principals of the dyn pointers are equal. Borrowck additionally assumes that these principals have already been proven equal *modulo regions*, and we thus ICE since `Trait<u8>` and `Trait<()>` do not unify:

16ad385579/compiler/rustc_borrowck/src/type_check/mod.rs (L1481-L1524)

This PR fixes this ICE by checking whether the RHS of the cast is considered to be Sized in the environment of the MIR typeck, and if so then skipping over this dyn->dyn principal compatibility check.

r? `@lcnr` perhaps?
2025-08-25 19:52:19 +10:00
Stuart Cook
9b462730d6
Rollup merge of #135761 - hkBst:patch-9, r=ibraheemdev
Dial down detail of B-tree description

fixes #134088, though it is a shame to lose some of this wonderful detail.

r? `@workingjubilee`

EDIT: newest versions keep old detail, but move it down a bit.
2025-08-25 19:52:19 +10:00
lcnr
7ee5cf6087 fold regions, don't erase
erase regions also anonymizes bound vars, which is undesirable
2025-08-25 11:29:29 +02:00
Tshepang Mbambo
d1d1fb3bb1
Merge pull request #2551 from rust-lang/rustc-pull
Rustc pull update
2025-08-25 11:29:25 +02:00
Ryan Lee
baff99c556
Remove bug comments from Repeat variant
Removed comments related to a bug in Repeat variant.
2025-08-25 15:49:10 +09:00
The rustc-josh-sync Cronjob Bot
721337b92a Merge ref 'a1dbb443527b' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: a1dbb443527bd126452875eb5d5860c1d001d761
Filtered ref: c2339048a82c55166f9b9ee83fd618be252a6e23

This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-25 04:13:22 +00:00
The rustc-josh-sync Cronjob Bot
c4cd29b7fb Prepare for merging from rust-lang/rust
This updates the rust-version file to a1dbb443527bd126452875eb5d5860c1d001d761.
2025-08-25 04:13:14 +00:00
bors
ee361e8fca Auto merge of #145480 - cjgillot:sizeless-chunks, r=Mark-Simulacrum
Remove chunk size from each chunk in `ChunkedBitSet`.

Almost all chunks in a `ChunkedBitSet` have the same constant `CHUNK_SIZE`, except the last in a bitset which takes the remainder `domain_size % CHUNK_SIZE`.

r? `@ghost` for perf
2025-08-25 04:07:23 +00:00
bors
a1dbb44352 Auto merge of #145262 - compiler-errors:prefer-only-param, r=lcnr
Make sure to treat only param where clauses as inherent

See the description in the test file.

This PR fixes a bug introduced by rust-lang/rust#141333, where we considered non-`Param` where clauses to be "inherent" for the purpose of method probing, which leads to both changes in method ambiguity (see test) and also import usage linting (and thus fixes https://github.com/rust-lang/rust/issues/145185).

r? `@lcnr`
2025-08-24 23:52:27 +00:00
Camille Gillot
9c9a89a18a Update documentation. 2025-08-24 22:15:19 +00:00
Nicholas Nethercote
a06c3887bd Remove the lifetime from ExpTokenPair/SeqSep.
`TokenKind` now impls `Copy`, so we can store it directly rather than a
reference.
2025-08-25 08:02:52 +10:00
Nicholas Nethercote
63b26c5ebd Update bitflags to 2.9.3.
The `bitflags!` macro in the latest release has slightly streamlined
codegen. See https://github.com/bitflags/bitflags/pull/458 for details.
2025-08-25 06:50:06 +10:00
Michael Goulet
c2b9a8afa9 Make sure to treat only param where clauses as inherent 2025-08-24 20:30:52 +00:00
bors
809200ec95 Auto merge of #137229 - GuillaumeGomez:expand-macro, r=lolbinarycat
Add support for macro expansion in rustdoc source code pages

This is what it looks like:

![Screenshot From 2025-02-18 18-08-51](https://github.com/user-attachments/assets/ce2b3806-6218-47df-94bf-e9e9ed40cd41)

![image](https://github.com/user-attachments/assets/891042db-8632-4dba-9343-e28570c058fe)

You can test it [here](https://rustdoc.crud.net/imperio/macro-expansion/src/lib/lib.rs.html). In this case, I also enabled the `--generate-link-to-definition` to show that both options work well together.

Note: <del>There is a bug currently in firefox where the line numbers are not displayed correctly if they're inside the "macro expansion" span: https://bugzilla.mozilla.org/show_bug.cgi?id=1949948<del> Found a workaround around this bug.

r? `@notriddle`
2025-08-24 19:46:17 +00:00
binarycat
9567812592 compiletest: if a compiler fails outside a ui test, show its output 2025-08-24 11:36:22 -05:00
bors
3776358beb Auto merge of #145812 - karolzwolak:attrs-in-fields-and-variants-section, r=GuillaumeGomez
rustdoc: render attributes in Field and Variants sections

Follow up to  rust-lang/rust#145782.
Render attributes in Field and Variants sections.

Associated constants and methods are already rendered with attributes in their sections, so I figured out fields  and variants should too.
(no change here)
<img width="378" height="265" alt="image" src="https://github.com/user-attachments/assets/b4f45c42-0146-486e-8881-138d2a7ad1c4" />
r? `@GuillaumeGomez`

---
Before (left) / after (right):

<img width="396" height="519" alt="image" src="https://github.com/user-attachments/assets/18288e13-09e7-448c-ba98-2023fa6df597" />
<img width="382" height="597" alt="image" src="https://github.com/user-attachments/assets/e624dc84-d169-41cc-bb89-7a1c2b2bb3e3" />

<img width="371" height="313" alt="image" src="https://github.com/user-attachments/assets/29833645-0b93-4900-80a8-c5a1e0b541b4" />
<img width="371" height="331" alt="image" src="https://github.com/user-attachments/assets/d5ce4b9e-f7f1-4f36-8ac0-08b0b5077e48" />

<img width="362" height="309" alt="image" src="https://github.com/user-attachments/assets/0436a51d-29a5-4403-a27c-7697524f807a" />
<img width="357" height="332" alt="image" src="https://github.com/user-attachments/assets/9a759fc5-30e7-4bbb-a88a-a3e3d1ed02aa" />
2025-08-24 16:27:32 +00:00
Mateusz Mikuła
b1be775dd6 raw-dylib-elf: set correct DT_VERDEFNUM
Previously it indicated a single version, regardless of their count.
Observed in: https://github.com/davidlattimore/wild/pull/1041
2025-08-24 18:19:31 +02:00
Zalathar
b4e97e5d86 Rename llvm::Bool aliases to standard const case
This avoids the need for `#![allow(non_upper_case_globals)]`.
2025-08-24 23:09:54 +10:00
Zalathar
455a67bd4f Replace the llvm::Bool typedef with a proper newtype 2025-08-24 23:09:54 +10:00
Jonathan Brouwer
fe81a79e59
Regression test for attributes on macro calls
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-24 14:54:15 +02:00
waffle
06608bafbc
Merge pull request #2550 from WaffleLapkin/try-bors
Suggest using `@bors try jobs=...`
2025-08-24 14:29:03 +02:00
Jonathan Brouwer
3851e6c7b6
Warn on macro calls for attributes that had this behaviour previously 2025-08-24 14:29:03 +02:00
bjorn3
525c6a3562 Directly raise fatal errors inside the codegen backends
As opposed to passing it around through Result.
2025-08-24 11:20:41 +00:00
bors
41a79f1862 Auto merge of #145384 - ywxt:parallel-tests, r=jieyouxu
Add more tests for the parallel rustc

At the moment, the parallel frontend test cases are severely lacking. Althought some reported issues have been resolved, they haven't been added into the tests.

This PR arranges the resolved ICE issues and adds tests for them.

Whether it is worthwhile to add a separate test suite for the paralel frontend still requires futher discussion. But we are trying coveraging issues being resolved through capability of the existing UI test suite.

Discussion: [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/233931-t-compiler.2Fmajor-changes/topic/Proposal.20for.20a.20dedicated.20test.20suite.20for.20t.E2.80.A6.20compiler-team.23906)

Related issues:
- rust-lang/rust#120760
- rust-lang/rust#124423 fixed by rust-lang/rust#140358
- rust-lang/rust#127971 fxied by rust-lang/rust#140358
- rust-lang/rust#120601 fixed by rust-lang/rust#127311

cc `@jieyouxu`
2025-08-24 11:13:14 +00:00
Marijn Schouten
1b77387085 Prevent confusion with insertion-ordered maps. 2025-08-24 10:50:20 +00:00
Marijn Schouten
bb7993f807 focus more on ordered aspect and restore old comments 2025-08-24 10:50:20 +00:00
Marijn Schouten
3f339ab849 Dial down detail of B-tree description
fixes 134088, though it is a shame to lose some of this wonderful detail.
2025-08-24 10:50:20 +00:00
bjorn3
46a7d28a7d Handle unwinding fatal errors in codegen workers 2025-08-24 10:27:03 +00:00
Karol Zwolak
b8313dfb04 rustdoc: render attributes in Field and Variants sections 2025-08-24 12:01:08 +02:00
Havard Eidnes
2f1b6d19f1 bootstrap.py: follow up more 'tidy' insistence (string quotes). 2025-08-24 09:39:33 +00:00
houpo-bob
5d41f7ccb8 Fix some minor issues in comments
Signed-off-by: houpo-bob <houpocun@outlook.com>
2025-08-24 16:58:22 +08:00
bors
93edf9f9b0 Auto merge of #137729 - jdonszelmann:fix-137687, r=fmease
Port `#[crate_name]` to the new attribute parsing infrastructure

r? `@fmease`

Closes rust-lang/rust#137687
2025-08-24 07:44:42 +00:00
Jana Dönszelmann
48a4e2d2dd
fix ICE on stable related to attrs on macros 2025-08-24 09:20:57 +02:00
Jana Dönszelmann
59ceb02d65
Port crate name to the new attribute system 2025-08-24 09:20:57 +02:00
Jana Dönszelmann
4b35cde904
Support lints in early attribute parsing 2025-08-24 09:14:49 +02:00
Jana Dönszelmann
3bf6144461
Allow errors to be emitted as fatal during attribute parsing 2025-08-24 09:14:49 +02:00
Zachary S
25afbbc981 Remove arm::t32-specific function pointer test.
All function pointers are currently treated as unaligned anyway;
any change implementing function pointer alignment during consteval should add
tests that it works properly on arm::t32 functions.
2025-08-23 23:41:05 -05:00