Commit Graph

168994 Commits

Author SHA1 Message Date
Jana Dönszelmann 0eed5ab550 introduce fcw macro 2025-12-10 15:15:54 +01:00
Matthias Krüger b13a25377d Rollup merge of #149755 - Zalathar:test-mode, r=jieyouxu
bootstrap: Use a `CompiletestMode` enum instead of bare strings

This gives better static checking when dealing with compiletest modes in bootstrap, especially for those modes that overlap with the name of a test suite directory.

r? jieyouxu (or bootstrap)
2025-12-09 06:17:25 +01:00
Matthias Krüger 2b0262c199 Rollup merge of #149754 - jieyouxu:compiletest-cli, r=Zalathar
Retire `opt_str2` from compiletest cli parsing

We have `Option<..>`, we don't need to invent "(none)" as option-at-home.

- More specifically, when some test suite expect certain values to be present, they should `.expect(..)` the value, and not potentially receive some "(none)" in some cases.

r? Zalathar
2025-12-09 06:17:25 +01:00
Matthias Krüger c4778dcc39 Rollup merge of #149720 - jtracey:patch-1, r=notriddle
rustdoc book: mention inner doc attribute

Couldn't find this documented anywhere else.
2025-12-09 06:17:23 +01:00
bors a371038013 Auto merge of #149426 - antoyo:libgccjit-targets, r=Kobzol
Move the libgccjit.so file in a target directory

Since GCC is not multi-target, we need multiple libgccjit.so. Our solution to have a directory per target so that we can have multiple libgccjit.so.

r? `@Kobzol`
2025-12-09 01:58:46 +00:00
bors 0b96731cd1 Auto merge of #149776 - bjorn3:sync_cg_clif-2025-12-08, r=bjorn3
Subtree sync for rustc_codegen_cranelift

The main highlights this time are a Cranelift update and adding actual support for `-Cdebuginfo=line-tables-only` rather than treating it the same as `-Cdebuginfo=full`.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2025-12-08 22:35:48 +00:00
bors 37aa2135b5 Auto merge of #149766 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

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

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

r? `@ghost`
2025-12-08 19:24:45 +00:00
bjorn3 cb49fe5854 Update list of allowed cg_clif dependencies 2025-12-08 16:26:26 +00:00
Zalathar dc8cdb1c00 Use a CompiletestMode enum in bootstrap 2025-12-08 21:35:58 +11:00
Zalathar 8c582e1f53 Don't require test::Coverage to implement Ord
This derive was an artifact of test-only method `Cache::all` wanting to
automatically sort its output to hide HashMap iteration order.

We can achieve an equivalent result by requiring the caller to provide a
projection function that returns results that _are_ sortable.
2025-12-08 21:35:16 +11:00
Jieyou Xu 72541e9a51 compiletest: retire opt_str2
We either have the value of a flag specified, or we don't. Use
`Option<...>` to represent that -- don't invent a new "(none)" sentinel
value...
2025-12-08 17:44:02 +08:00
Jieyou Xu a7ad2142e3 compiletest: make presence/absence of adb-related options clear
Instead of possibly falling back to "(none)" when they are not
specified.
2025-12-08 17:44:02 +08:00
Jieyou Xu 260b1ffc2c compiletest: require host/target flags specified
Instead of allowing them to be missing and using some placeholder
"(none)" value instead.
2025-12-08 17:44:01 +08:00
bors 5bc345055b Auto merge of #149455 - jdonszelmann:metadata-decoding-s, r=WaffleLapkin
Remove unwraps from metadata decoding: introduce `BlobDecoder`

r? `@oli-obk`
2025-12-08 09:41:00 +00:00
Stuart Cook fa9a8f45fc Rollup merge of #149710 - Zalathar:ambient-gdb, r=jieyouxu
Move ambient gdb discovery from compiletest to bootstrap

- Follow-up to https://github.com/rust-lang/rust/pull/148099

---

This code takes the compiletest code for discovering an “ambient” `gdb` in the user's path, and moves it to bootstrap.

One of the eventual goals is to allow compiletest to assume that if it has been asked to run the debuginfo-gdb suite, then it *must* have been passed an explicit `--gdb`, though we aren't quite there yet.

r? jieyouxu
2025-12-08 11:46:24 +11:00
Stuart Cook a76db5581b Rollup merge of #149676 - reddevilmidzy:t10, r=Kivooeo
Tidying up tests/ui/issues tests [3/N]

> [!NOTE]
> Intermediate commits are intended to help review, but will be squashed add comment commit prior to merge.

part of rust-lang/rust#133895

r? Kivooeo
2025-12-08 11:46:23 +11:00
Jana Dönszelmann fa5f075d1c add TyCtxt everywhere replacing nothing or passed sessions 2025-12-08 00:24:28 +01:00
bors ba2142a19c Auto merge of #149517 - WaffleLapkin:alphabet-blessing, r=jdonszelmann
Implement blessing for tidy alphabetical check

r? `@jdonszelmann`
2025-12-07 20:08:33 +00:00
Lukas Wirth 632acd7247 Merge pull request #21222 from A4-Tacks/no-comp-resugar-unit-ret-ty
No complete unit RetType in resugar async assoc item
2025-12-07 15:06:49 +00:00
Lukas Wirth 34c61d1a72 fix: Disable postcard use temporarily 2025-12-07 14:52:10 +01:00
A4-Tacks 89a8142571 No complete unit RetType in resugar async assoc item
Example
---
```rust
use core::future::Future;

trait DesugaredAsyncTrait {
    fn foo(&self) -> impl Future<Output = ()> + Send;
}

impl DesugaredAsyncTrait for () {
    $0
}
```

**Before this PR**

```rust
use core::future::Future;

trait DesugaredAsyncTrait {
    fn foo(&self) -> impl Future<Output = ()> + Send;
}

impl DesugaredAsyncTrait for () {
    async fn foo(&self) -> () {
        $0
    }
}
```

**After this PR**

```rust
use core::future::Future;

trait DesugaredAsyncTrait {
    fn foo(&self) -> impl Future<Output = ()> + Send;
}

impl DesugaredAsyncTrait for () {
    async fn foo(&self) {
        $0
    }
}
```
2025-12-07 21:18:40 +08:00
Waffle Lapkin 3bbd6ea19a attempt to fix tidyselftest on windows 2025-12-07 13:58:35 +01:00
Waffle Lapkin 87f9ea206e add tests for tidy alphabetical blessing 2025-12-07 13:58:35 +01:00
Lukas Wirth 9f9c9c3845 Merge pull request #21178 from Veykril/tracked-modules
internal: Make `ModuleId` a tracked struct
2025-12-07 08:41:04 +00:00
Lukas Wirth a1a9514f6f Turn BlockLoc into a tracked struct 2025-12-07 09:31:53 +01:00
Lukas Wirth 7766ee6869 Make ModuleId a tracked struct
optimize some stuff

Optimize `pub(crate)` visibility resolution

Optimize private visibility resolution
2025-12-07 09:31:19 +01:00
Lukas Wirth ed043f4813 Merge pull request #21215 from ChayimFriedman2/unsized-struct
fix: Don't implement sizedness check via `all_field_tys()`
2025-12-07 08:30:54 +00:00
Matthias Krüger 1eef811747 Rollup merge of #149724 - Kobzol:libstd-text-staging, r=jieyouxu
Fix off-by-one staging output when testing the library

It seems generally useful to store the `Mode` in `Cargo`, I remember thinking a few times that it would be useful in other places.

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

r? `@jieyouxu`
2025-12-07 08:26:51 +01:00
Matthias Krüger 3d4d195407 Rollup merge of #149721 - generalmimon:rustc-book-sidebar-link-label-fix, r=ChrisDenton
rustc book: fix `*-pc-windows-msvc` link label in sidebar

As far as I know, `*-unknown-windows-msvc` is not a thing. At least if I search for "unknown-windows-msvc" in the entire [rust-lang](https://github.com/rust-lang) organization (https://github.com/search?q=org%3Arust-lang+%22unknown-windows-msvc%22++&type=code&state=open), it gives only this occurrence and 3 other occurrences in https://github.com/rust-lang/lld, which was archived in 2019.

I believe `*-pc-windows-msvc` is the correct replacement because that is the name of the page the link points to:

https://github.com/rust-lang/rust/blob/ba86c0460b0233319e01fd789a42a7276eade805/src/doc/rustc/src/platform-support/windows-msvc.md?plain=1#L1
2025-12-07 08:26:50 +01:00
Matthias Krüger 842f95de70 Rollup merge of #147136 - Jules-Bertholet:const-_-unused-vis, r=jdonszelmann
Add warn-by-default lint for visibility on `const _` declarations

Add a warn-by-default `unused_visibilities` lint for visibility qualifiers on `const _` declarations—e.g. `pub const _: () = ();`. Such qualifiers have no effect.

A [Sourcegraph search](https://sourcegraph.com/search?q=context:global+lang:Rust+pub%5Cs*%28%5C%28.*%5C%29%29%3F%5Cs*const%5Cs%2B_%5Cs*:&patternType=regexp&case=yes&sm=0) suggests that this pattern is relatively rare, and mostly found in tests (with only 3 exceptions). So perhaps this could become an FCW/hard error in the future.

`@rustbot` label T-lang A-lints A-visibility -T-clippy
2025-12-07 08:26:49 +01:00
Zalathar 8f35bd17cc Move ambient gdb discovery from compiletest to bootstrap 2025-12-07 13:44:25 +11:00
Zalathar 85f7a6ed61 Move Android-related discovery out of core::debuggers
While some of this information is needed by debugger discovery, it is also
needed by non-debuginfo tests, so the code doesn't belong in the `debuggers`
module.
2025-12-07 13:41:55 +11:00
Chayim Refael Friedman aafe60d12f Merge pull request #21218 from ChayimFriedman2/update-supported-version
internal: Update supported Rust version to 1.90.0
2025-12-07 00:24:54 +00:00
Chayim Refael Friedman e9d18d5b60 Update supported Rust version to 1.90.0
We no longer work properly with older versions.
2025-12-07 02:14:39 +02:00
bors d427ddfe90 Auto merge of #149717 - matthiaskrgr:rollup-spntobh, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#149659 (Look for typos when reporting an unknown nightly feature)
 - rust-lang/rust#149699 (Implement `Vec::from_fn`)
 - rust-lang/rust#149700 (rustdoc: fix bugs with search aliases and merging)
 - rust-lang/rust#149713 (Update windows-gnullvm platform support doc)
 - rust-lang/rust#149716 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-06 21:42:15 +00:00
Jakub Beránek 7fdf06693a Fix off-by-one staging output when testing the library 2025-12-06 22:02:23 +01:00
Chayim Refael Friedman 74734878c8 Don't implement sizedness check via all_field_tys()
Since we don't implement it currently for perf reasons, but here we only need a struct's tail field, it will be wrong.
2025-12-06 21:23:21 +02:00
Jules Bertholet 234df83fe3 Add warn-by-default lint for visibility on const _ declarations
Add a warn-by-default `unused_visibility` lint for visibility qualifiers
on `const _` declarations - e.g. `pub const _: () = ();`.
These have no effect.
2025-12-06 13:48:58 -05:00
Petr Pučil bd2d4eb79e rustc book: fix *-pc-windows-msvc link label in sidebar
As far as I know, `*-unknown-windows-msvc` is not a thing. At least if I search for "unknown-windows-msvc" in the entire [rust-lang](https://github.com/rust-lang) organization (https://github.com/search?q=org%3Arust-lang+%22unknown-windows-msvc%22++&type=code&state=open), it gives only this occurrence and 3 other occurrences in https://github.com/rust-lang/lld, which was archived in 2019.

I believe `*-pc-windows-msvc` is the correct replacement because that is the name of the page the link points to:

https://github.com/rust-lang/rust/blob/ba86c0460b0233319e01fd789a42a7276eade805/src/doc/rustc/src/platform-support/windows-msvc.md?plain=1#L1
2025-12-06 18:09:29 +01:00
Justin Tracey a3a041da11 rustdoc book: mention inner doc attribute 2025-12-06 11:16:14 -05:00
Matthias Krüger 874b7c2e0b Rollup merge of #149716 - RalfJung:miri, r=RalfJung
miri subtree update

Subtree update of `miri` to https://github.com/rust-lang/miri/commit/56a3765270a80efd555f82029e1823fedce58821.

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

r? `@ghost`
2025-12-06 16:27:11 +01:00
Matthias Krüger 1dcaef9846 Rollup merge of #149713 - mati865:gnullvm-doc, r=petrochenkov
Update windows-gnullvm platform support doc
2025-12-06 16:27:10 +01:00
Matthias Krüger d0bcc42121 Rollup merge of #149700 - notriddle:alias-loading, r=GuillaumeGomez
rustdoc: fix bugs with search aliases and merging

These bugs cause a crash and a perf problem with aliases, caused by loading the search index when it's not expected.

cc `@weihanglo`

r? `@GuillaumeGomez`
2025-12-06 16:27:09 +01:00
Ralf Jung 5339794101 Merge pull request #4747 from RalfJung/empty-stack-error
show span when there is an error invoking a global ctor/dtor or the thread main fn
2025-12-06 14:34:52 +00:00
Ralf Jung 7ad3301e03 show span when there is an error invoking a global ctor/dtor or the thread main fn 2025-12-06 15:11:52 +01:00
Ralf Jung 73f124e7ea Merge pull request #4739 from royAmmerschuber/feature/refactor-tree-visitor
Move `TreeVisitor` into its own file & make it generic.
2025-12-06 13:53:41 +00:00
bors ba86c0460b Auto merge of #149704 - matthiaskrgr:rollup-u4zhw99, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#146826 (Implement `Allocator` for `&mut A` where `A: Allocator + ?Sized`)
 - rust-lang/rust#148487 (add Option::into_flat_iter)
 - rust-lang/rust#148814 (stabilize `array_windows`)
 - rust-lang/rust#149401 (Fix `name()` functions for local defs in rustc_public)
 - rust-lang/rust#149683 (Fix armv8r-none-eabihf tier)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-06 12:25:12 +00:00
Mateusz Mikuła a2910ce5b4 Update windows-gnullvm platform support doc 2025-12-06 13:01:55 +01:00
Ralf Jung a26b26ac6f cleanup: the *64 functions are Linux-specific 2025-12-06 12:39:30 +01:00
Ralf Jung 44aaae38ac remove readdir_r on FreeBSD: it is deprecated, unused, and untested 2025-12-06 12:38:39 +01:00