Commit graph

166918 commits

Author SHA1 Message Date
bors
35456985fa Auto merge of #147518 - dianqk:update-llvm, r=cuviper,Kobzol
Update LLVM to 21.1.3

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

After rust-lang/rust#146124, we need more space to run x86_64-gnu-distcheck if building LLVM from source. According to the building log, the space freed by `free-disk-space-linux.sh` is not entirely available.

```
You are running out of disk space.
The runner will stop working when the machine runs out of disk space.
Free space left: 98 MB

disk usage:
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        72G   43G   29G  60% /
tmpfs           7.9G   84K  7.9G   1% /dev/shm
tmpfs           3.2G  1.2M  3.2G   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sda16      881M   60M  760M   8% /boot
/dev/sda15      105M  6.2M   99M   6% /boot/efi
/dev/sdb1        74G   28K   70G   1% /mnt
tmpfs           1.6G   12K  1.6G   1% /run/user/1001
```
2025-10-13 05:11:33 +00:00
Matthias Krüger
13ef05d52f
Rollup merge of #147592 - Shunpoco:add-tidy-to-check, r=Zalathar
Add tidy to the target of ./x check

## Context
Discussion: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/tidy.20isn't.20in.20.2E.2Fx.20check/with/544323712

Currently `tidy` (src/tools/tidy) is not included in the list of `./x check`. It means that rust-analyzer doesn't work for codes in the directory if you use `./x check` as the analyzer on your IDE.

## Change

This PR adds src/tools/tidy into the target of `./x check`. It enables rust-analyzer highlight errors/warns on all codes in the directory.

Note that since tidy is implicitly checked by `./x test tidy`, this new check is off by default.
2025-10-12 19:07:47 +02:00
Matthias Krüger
6c71fcb8e2
Rollup merge of #147495 - alexcrichton:update-wasm-component-ld, r=Mark-Simulacrum
Update wasm-component-ld to 0.5.18

Keeping it up-to-date with upstream for the latest bug fixes and such related to wasm-tools-implemented internals.
2025-10-12 19:07:46 +02:00
Matthias Krüger
0988d2465d
Rollup merge of #147178 - Walnut356:msvc_enum_summary, r=Mark-Simulacrum
[DebugInfo] Improve formatting of MSVC enum struct variants

More robust handling mirroring the `TupleSummaryProvider` function

before:
<img width="1168" height="28" alt="image" src="https://github.com/user-attachments/assets/994f0884-55c2-4d3d-b1b2-97df17f0c9f0" />

after:
<img width="813" height="31" alt="image" src="https://github.com/user-attachments/assets/8ad3dfa0-3aa7-42a9-bf50-6f5eaf0365aa" />

This shouldn't affect any tests as we don't run debuginfo tests for MSVC afaik
2025-10-12 19:07:46 +02:00
Matthias Krüger
9d9ede81f5
Rollup merge of #147168 - jyn514:no-alloc, r=Mark-Simulacrum
Don't unconditionally build alloc for `no-std` targets

It's possible for targets to only support `core` and not `alloc`. Instead of building alloc unconditionally, pass a list of crates to build into `std_cargo`, and only pass `-p alloc` if the list of crates wasn't already filtered to a subset.

The original use case was to reuse `std_cargo` for a rustc_driver that doesn't emit metadata. But this seems like a reasonable change regardless.
2025-10-12 19:07:45 +02:00
bors
ff6dc928c5 Auto merge of #142390 - cjgillot:mir-liveness, r=davidtwco
Perform unused assignment and unused variables lints on MIR.

Rebase of https://github.com/rust-lang/rust/pull/101500

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

The first commit moves detection of uninhabited types from the current liveness pass to MIR building.

In order to keep the same level of diagnostics, I had to instrument MIR a little more:
- keep for which original local a guard local is created;
- store in the `VarBindingForm` the list of introducer places and whether this was a shorthand pattern.

I am not very proud of the handling of self-assignments. The proposed scheme is in two parts: first detect probable self-assignments, by pattern matching on MIR, and second treat them specially during dataflow analysis. I welcome ideas.

Please review carefully the changes in tests. There are many small changes to behaviour, and I'm not sure all of them are desirable.
2025-10-12 13:00:04 +00:00
Shunpoco
d70857a1e0 Add tidy into ./x check
This commit adds src/tools/tidy into `./x check`. It enables rust-analyzer hightlights errors/warns on all codes in src/tools/tidy.
Since tidy is implicitly checked by `./x test tidy`, this new check is off by default.
2025-10-12 08:49:39 +01:00
Shunpoco
340702c0c2 write x.py's help for saving output time
Currently x.py help (or x.py --help) builds bootstrap binary everytime, but it delays printing help.
This change saves the current top level help text into a file. x.py help prints the file and doesn't touch bootstrap binary.
x.py test bootstrap checks if the file is up to date.
Note that subcommand level helps (e.g., x.py check --help) aren't saved.
2025-10-11 23:16:18 +01:00
Camille GILLOT
f216ec23ba Silence warning in miri tests. 2025-10-11 20:50:21 +00:00
Camille GILLOT
72a04a7e0a Silence warning in r-a. 2025-10-11 20:50:21 +00:00
Camille GILLOT
ca0379d6cd Diagnose liveness on MIR. 2025-10-11 20:50:21 +00:00
bors
360a3a4e65 Auto merge of #147568 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

22 commits in 801d9b4981dd07e3aecdca1ab86834c13615737e..81c3f77a467359c8be6bc747dc93ec66a6e4ce11
2025-10-04 13:30:15 +0000 to 2025-10-10 18:41:02 +0000
- docs(changelog): literal host-tuple support (rust-lang/cargo#16033)
- refactor: Define cargo script's target-dir using build-dir templating (rust-lang/cargo#16073)
- feat(build-dir): Reorganize build-dir layout (rust-lang/cargo#15947)
- refactor: unflatten `(String, Def)` to `ConfigValue` (rust-lang/cargo#16084)
- fix(tree): Switch from `--depth public` to `--edges public` (rust-lang/cargo#16081)
- docs(guide): Point out tools for reducing dependencies (rust-lang/cargo#16078)
- Allow to rustfix unused_variables lint. (rust-lang/cargo#16082)
- Fix test that assumes `CARGO_CFG_TARGET_FAMILY` is a single value (rust-lang/cargo#16079)
- Fix regression that swallowed json diagnostic explanations (rust-lang/cargo#16075)
- docs(ref): fix link to clippy incompatible_msrv lint (rust-lang/cargo#16077)
- Convert a few more diagnostics to reports (rust-lang/cargo#16066)
- fix(support): Add track_caller to know the actual failure (rust-lang/cargo#16069)
- fix(add): Report a missing source error for workspace dependencies  (rust-lang/cargo#16063)
- fix(script): Default bin.name to package.name  (rust-lang/cargo#16064)
- refactor(gctx): ConfigValue getter cleanup (rust-lang/cargo#16067)
- Fix unsafe_op_in_unsafe_fn for Windows (rust-lang/cargo#16058)
- Consider public dependencies when choosing a version in cargo add (rust-lang/cargo#1… (rust-lang/cargo#15966)
- docs: clarify panic-immediate-abort can be used in config (rust-lang/cargo#16054)
- fix(timings): compute codegen start time to draw dep lines (rust-lang/cargo#16055)
- chore: Added tracing span for build script execution (rust-lang/cargo#16053)
- test: null-terminated path for reserved windows name detection (rust-lang/cargo#16052)
- feat (publish): deprecate `--token` option (rust-lang/cargo#16046)

r? ghost
2025-10-11 15:50:49 +00:00
bors
442288534b Auto merge of #147574 - dianqk:rollup-njdujqk, r=dianqk
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#145651 (Regression test for const promotion with Option<Ordering>)
 - rust-lang/rust#145722 (implement Extend<{Group, Literal, Punct, Ident}> for TokenStream)
 - rust-lang/rust#146520 (Promote armv8r-none-eabihf target to Tier 2)
 - rust-lang/rust#146522 (Promote armv7a-none-eabihf to Tier 2)
 - rust-lang/rust#147289 (Mitigate `thread_local!` shadowing issues)
 - rust-lang/rust#147515 (Update rustc-perf submodule)
 - rust-lang/rust#147522 (compiletest: Use the same directive lines for EarlyProps and ignore/only/needs)
 - rust-lang/rust#147525 (Replace locals in debuginfo records during ref_prop and dest_prop)
 - rust-lang/rust#147544 (Remove StatementKind::Deinit.)
 - rust-lang/rust#147551 (remove `#[rustc_inherit_overflow_checks]` from `is_multiple_of`)
 - rust-lang/rust#147553 (Move `wasm32-wasip3`  to the tier 3 table)
 - rust-lang/rust#147562 (Stabilize `NonZero<u*>::div_ceil`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-11 12:38:21 +00:00
Zalathar
7f0adce34a ci: Use GNU coreutils to work around a libffi-sys build failure 2025-10-11 16:29:15 +11:00
dianqk
6d8272fb27
Rollup merge of #147553 - saethlin:wasip3-tier-3, r=petrochenkov
Move `wasm32-wasip3`  to the tier 3 table

https://github.com/rust-lang/rust/pull/147205 says it wanted to add this as a tier 3 target but accidentally added it to the tier 2 table.
2025-10-11 07:06:00 +08:00
dianqk
0ef3d203e8
Rollup merge of #147544 - cjgillot:nodeinit, r=saethlin
Remove StatementKind::Deinit.

It is a remnant from the time we deaggreated MIR.

Now, it is only constructed by the `LargeEnums` MIR pass, which is disabled by default.
2025-10-11 07:05:58 +08:00
dianqk
cfc27fbc4b
Rollup merge of #147522 - Zalathar:directive, r=jieyouxu
compiletest: Use the same directive lines for EarlyProps and ignore/only/needs

Currently we load each discovered test file to scan it for directives once for EarlyProps parsing, then reload and scan it once *per revision* for ignore processing. If a revision is not ignored, we then reload and scan it again during actual execution.

That's a bit silly, so this PR tries to reduce the number of unnecessary file loads and line scans for directive parsing, by reusing the same collection of `DirectiveLine` values for EarlyProps and for each revision's ignores.

Each individual directive still needs to be re-parsed a bunch of times, but those steps can at least avoid scanning the whole file, or having to split out names from values.

---

There's more that could be done after this, such as only doing known-directive checks once per file, or embedding file paths in each `DirectiveLine`, but I decided to stop here to allow review in modest chunks.

r? jieyouxu
2025-10-11 07:05:57 +08:00
dianqk
046260ecc5
Rollup merge of #147515 - Kobzol:update-rustc-perf, r=lqd,nnethercote
Update rustc-perf submodule

To bring in https://github.com/rust-lang/rustc-perf/pull/2274, https://github.com/rust-lang/rustc-perf/pull/2275 and https://github.com/rust-lang/rustc-perf/pull/2276.

r? `@nnethercote`

try-job: dist-x86_64-linux
try-job: dist-x86_64-msvc
2025-10-11 07:05:56 +08:00
dianqk
e1af13b7c0
Rollup merge of #146522 - thejpster:promote-armv7a-none-eabihf, r=petrochenkov
Promote armv7a-none-eabihf to Tier 2

This PR promotes armv7a-none-eabihf to Tier 2, to join armv7r-none-eabihf and armv7a-none-eabi. I believe it was simply an oversight that it wasn't made Tier 2 before, as most Armv7-A targets have an FPU and it often makes sense to use it.

This PR wil be rebased once https://github.com/rust-lang/rust/pull/146419 completes the queue.

> - A tier 2 target must have value to people other than its maintainers. (It may
>   still be a niche target, but it must not be exclusively useful for an
>   inherently closed group.)

The `armv7a-none-eabihf` target is for all Arm Cortex-A processors (either 32-bit only, or in 32-bit mode) where the user wants to use the FPU.

>- A tier 2 target must have a designated team of developers (the "target
>  maintainers") available to consult on target-specific build-breaking issues,
>  or if necessary to develop target-specific language or library implementation
>  details. This team must have at least 2 developers.

The Embedded Devices Working Group's Arm Team have just started maintaining this target.

> - The target must not place undue burden on Rust developers not specifically
>   concerned with that target. Rust developers are expected to not gratuitously
>   break a tier 2 target, but are not expected to become experts in every tier 2
>   target, and are not expected to provide target-specific implementations for
>   every tier 2 target.

This target is highly similar to a number of existing Tier 2 targets, including `armv7r-none-eabihf` and `armv7a-none-eabi` and so it should not add undue burden.

> - The target must provide documentation for the Rust community explaining how
>   to build for the target using cross-compilation, and explaining how to run
>   tests for the target. If at all possible, this documentation should show how
>   to run Rust programs and tests for the target using emulation, to allow
>   anyone to do so. If the target cannot be feasibly emulated, the documentation
>   should explain how to obtain and work with physical hardware, cloud systems,
>   or equivalent.

https://doc.rust-lang.org/nightly/rustc/platform-support/armv7a-none-eabi.html was added in https://github.com/rust-lang/rust/pull/146419/. It covers the `-eabi` and the `-eabihf` targets.

> - The target must document its baseline expectations for the features or
>   versions of CPUs, operating systems, libraries, runtime environments, and
>   similar.

I believe it does.

> - If introducing a new tier 2 or higher target that is identical to an existing
>   Rust target except for the baseline expectations for the features or versions
>   of CPUs, operating systems, libraries, runtime environments, and similar,
>   then the proposed target must document to the satisfaction of the approving
>   teams why the specific difference in baseline expectations provides
>   sufficient value to justify a separate target.

It uses very similar FPUs to `armv7r-none-eabihf` but is otherwise the same as `armv7a-none-eabi`.

> - Tier 2 targets must not leave any significant portions of `core` or the
>  standard library unimplemented or stubbed out, unless they cannot possibly be
>  supported on the target.

It has a full libcore, as per the other arm*-none-* targets.

> - The code generation backend for the target should not have deficiencies that
>  invalidate Rust safety properties, as evaluated by the Rust compiler team.

It should be the same backend as `armv7r-none-eabihf` and friends, except for FPU support, which is already covered in `thumbv8m.main-none-eabihf`. There are no issues that I know of.

> - If the target supports C code, and the target has an interoperable calling
>   convention for C code, the Rust target must support that C calling convention
>   for the platform via `extern "C"`. The C calling convention does not need to
>   be the default Rust calling convention for the target, however.

The ABI is EABI, the same as many other Arm targets.

> - The target must build reliably in CI, for all components that Rust's CI
>   considers mandatory.

The https://github.com/rust-embedded/cortex-ar repository has been changed in https://github.com/rust-embedded/cortex-ar/pull/57 to build this target with `-Zbuild-std=core`. Locally it seems fine.

> - The approving teams may additionally require that a subset of tests pass in
>  CI, such as enough to build a functional "hello world" program, `./x.py test
>  --no-run`, or equivalent "smoke tests". In particular, this requirement may
>  apply if the target builds host tools, or if the tests in question provide
>  substantial value via early detection of critical problems.

There are no no-std tests in the tree that I'm aware of.

> - Building the target in CI must not take substantially longer than the current
>   slowest target in CI, and should not substantially raise the maintenance
>   burden of the CI infrastructure. This requirement is subjective, to be
>   evaluated by the infrastructure team, and will take the community importance
>   of the target into account.

Building libcore is quite fast.

> - Tier 2 targets should, if at all possible, support cross-compiling. Tier 2
>   targets should not require using the target as the host for builds, even if
>   the target supports host tools.

It does.

> - In addition to the legal requirements for all targets (specified in the tier
>   3 requirements), because a tier 2 target typically involves the Rust project
>   building and supplying various compiled binaries, incorporating the target
>   and redistributing any resulting compiled binaries (e.g. built libraries,
>   host tools if any) must not impose any onerous license requirements on any
>   members of the Rust project, including infrastructure team members and those
>   operating CI systems. This is a subjective requirement, to be evaluated by
>   the approving teams.

Just libcore required (and liballoc). No known issues here.

> - Tier 2 targets must not impose burden on the authors of pull requests, or
>   other developers in the community, to ensure that tests pass for the target.

Noted

> - The target maintainers should regularly run the testsuite for the target

The https://github.com/rust-embedded/cortex-ar repository will be changed to use the rustup component when available.

> and should fix any test failures in a reasonably timely fashion.

Noted
2025-10-11 07:05:55 +08:00
dianqk
020fede547
Rollup merge of #146520 - thejpster:promote-armv8r-none-eabi, r=petrochenkov
Promote armv8r-none-eabihf target to Tier 2

This PR promotes armv8r-none-eabihf to Tier 2, joining armv7r-none-eabi, armv7r-none-eabihf and armv7a-none-eabi.

This PR wil be rebased once https://github.com/rust-lang/rust/pull/146419 completes the queue.

> - A tier 2 target must have value to people other than its maintainers. (It may
>   still be a niche target, but it must not be exclusively useful for an
>   inherently closed group.)

The `armv8r-none-eabihf` target is for the Arm Cortex-R52 processor, as found in a number of Automotive SoCs that have just been released, or are about to be released. Currently SoCs are available from NXP and Renesas.

>- A tier 2 target must have a designated team of developers (the "target
>  maintainers") available to consult on target-specific build-breaking issues,
>  or if necessary to develop target-specific language or library implementation
>  details. This team must have at least 2 developers.

The Embedded Devices Working Group's Arm Team have just started maintaining this target.

> - The target must not place undue burden on Rust developers not specifically
>   concerned with that target. Rust developers are expected to not gratuitously
>   break a tier 2 target, but are not expected to become experts in every tier 2
>   target, and are not expected to provide target-specific implementations for
>   every tier 2 target.

This target is highly similar to a number of existing Tier 2 targets, including `armv7r-none-eabihf` and so it should not add undue burden.

> - The target must provide documentation for the Rust community explaining how
>   to build for the target using cross-compilation, and explaining how to run
>   tests for the target. If at all possible, this documentation should show how
>   to run Rust programs and tests for the target using emulation, to allow
>   anyone to do so. If the target cannot be feasibly emulated, the documentation
>   should explain how to obtain and work with physical hardware, cloud systems,
>   or equivalent.

https://doc.rust-lang.org/nightly/rustc/platform-support/armv8r-none-eabihf.html exists and was updated in https://github.com/rust-lang/rust/pull/146419/

> - The target must document its baseline expectations for the features or
>   versions of CPUs, operating systems, libraries, runtime environments, and
>   similar.

I believe it does.

> - If introducing a new tier 2 or higher target that is identical to an existing
>   Rust target except for the baseline expectations for the features or versions
>   of CPUs, operating systems, libraries, runtime environments, and similar,
>   then the proposed target must document to the satisfaction of the approving
>   teams why the specific difference in baseline expectations provides
>   sufficient value to justify a separate target.

The Armv8-R architecture introduces a new FPU type, the fp-armv8, and so this requires a unique target.

> - Tier 2 targets must not leave any significant portions of `core` or the
>  standard library unimplemented or stubbed out, unless they cannot possibly be
>  supported on the target.

It has a full libcore, as per the other arm*-none-* targets.

> - The code generation backend for the target should not have deficiencies that
>  invalidate Rust safety properties, as evaluated by the Rust compiler team.

It should be the same backend as `armv7r-none-eabihf` and friends, except for FPU support, which is already covered in `thumbv8m.main-none-eabihf`. There are no issues that I know of.

> - If the target supports C code, and the target has an interoperable calling
>   convention for C code, the Rust target must support that C calling convention
>   for the platform via `extern "C"`. The C calling convention does not need to
>   be the default Rust calling convention for the target, however.

The ABI is EABI, the same as many other Arm targets.

> - The target must build reliably in CI, for all components that Rust's CI
>   considers mandatory.

The https://github.com/rust-embedded/cortex-ar repository regularly builds this target with `-Zbuild-std=core` and it seems fine.

> - The approving teams may additionally require that a subset of tests pass in
>  CI, such as enough to build a functional "hello world" program, `./x.py test
>  --no-run`, or equivalent "smoke tests". In particular, this requirement may
>  apply if the target builds host tools, or if the tests in question provide
>  substantial value via early detection of critical problems.

There are no no-std tests in the tree that I'm aware of.

> - Building the target in CI must not take substantially longer than the current
>   slowest target in CI, and should not substantially raise the maintenance
>   burden of the CI infrastructure. This requirement is subjective, to be
>   evaluated by the infrastructure team, and will take the community importance
>   of the target into account.

Building libcore is quite fast.

> - Tier 2 targets should, if at all possible, support cross-compiling. Tier 2
>   targets should not require using the target as the host for builds, even if
>   the target supports host tools.

It does.

> - In addition to the legal requirements for all targets (specified in the tier
>   3 requirements), because a tier 2 target typically involves the Rust project
>   building and supplying various compiled binaries, incorporating the target
>   and redistributing any resulting compiled binaries (e.g. built libraries,
>   host tools if any) must not impose any onerous license requirements on any
>   members of the Rust project, including infrastructure team members and those
>   operating CI systems. This is a subjective requirement, to be evaluated by
>   the approving teams.

Just libcore required (and liballoc). No known issues here.

> - Tier 2 targets must not impose burden on the authors of pull requests, or
>   other developers in the community, to ensure that tests pass for the target.

Noted

> - The target maintainers should regularly run the testsuite for the target

The https://github.com/rust-embedded/cortex-ar repository will be changed to use the rustup component when available.

> and should fix any test failures in a reasonably timely fashion.

Noted
2025-10-11 07:05:54 +08:00
dianqk
a3482d97c6
Remove the temporary directory when a check ends 2025-10-11 06:57:11 +08:00
Weihang Lo
9c6c702431
Update cargo submodule 2025-10-10 15:45:46 -04:00
Jakub Beránek
ce671f998f
Update rustc-perf submodule 2025-10-10 15:42:42 +02:00
Camille Gillot
b7c2b3dc80 Remove StatementKind::Deinit. 2025-10-10 12:57:24 +00:00
Ben Kimock
6660d75710 Move to the tier 3 table 2025-10-10 07:52:49 -04:00
Zalathar
f3f83857d9 Use the same directive lines for EarlyProps and ignore/only/needs 2025-10-09 23:00:51 +11:00
bors
4b57d8154a Auto merge of #147519 - Zalathar:rollup-o5f16uo, r=Zalathar
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#147446 (PassWrapper: use non-deprecated lookupTarget method)
 - rust-lang/rust#147473 (Do `x check` on various bootstrap tools in CI)
 - rust-lang/rust#147509 (remove intrinsic wrapper functions from LLVM bindings)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-09 10:54:43 +00:00
dianqk
d4edd67f71
Update LLVM to 21.1.3 2025-10-09 18:23:56 +08:00
Zalathar
0be0a0a8d2 Do x check on various bootstrap tools in CI 2025-10-09 20:00:30 +11:00
Zalathar
7374789331 Support x check rustdoc-gui-test
This is useful for ensuring that changes to compiletest haven't broken
rustdoc-gui-test.
2025-10-09 19:58:52 +11:00
Stuart Cook
76d4f37c40
Rollup merge of #147506 - Zalathar:isolate, r=jieyouxu
compiletest: Isolate public APIs and minimize public surface area

As part of my ongoing efforts to improve directive parsing, I would like to be able to make internal changes without worrying about whether they're going to break the rustdoc-gui-test tool. That tool currently uses compiletest as a dependency to help with directive parsing.

This PR therefore isolates all of compiletest's public APIs into two dedicated modules, one used by rustdoc-gui-test, and one used by the compiletest binary in `compiletest/src/bin/main.rs`.

All other modules (and crate-root items) are then made non-`pub` to achieve the API isolation. Doing so reveals some unused items, which have been removed.

(To reduce the amount of immediate textual churn, this PR does not comprehensively replace `pub` with `pub(crate)` throughout the whole crate; that could be done in a follow-up PR.)

---

Ideally, rustdoc-gui-test would not depend on compiletest at all, but properly fixing that is out of scope for this PR.
- rust-lang/rust#143827

r? jieyouxu
2025-10-09 18:43:27 +11:00
Stuart Cook
68f9b3b5e9
Rollup merge of #147419 - cuviper:bootstrap-rustc-libs, r=Zalathar,jieyouxu
bootstrap: add `Builder::rustc_cmd` that includes the lib path

When building with `rust.rpath = false`, every `rustc` invocation needs
to include the library path as well. I particularly ran into this in
`generate_target_spec_json_schema` when testing 1.91-beta in Fedora,
where we do disable rpath for our system builds. The new helper function
will hopefully encourage the right thing going forward.
2025-10-09 18:43:21 +11:00
Stuart Cook
fd6546d514
Rollup merge of #146568 - sayantn:simd-shuffle, r=RalfJung
Port the implemention of SIMD intrinsics from Miri to const-eval

Ported the implementation of most SIMD intrinsics from Miri to rustc_const_eval. Remaining are

 - Math functions (as per `@RalfJung's` suggestions)
 - FMA (non-deterministic)
 - Funnel Shifts (not implemented in Miri yet)
 - Unordered reduction intrinsics (not implemented in Miri yet)
2025-10-09 18:43:20 +11:00
Zalathar
ce4699deff compiletest: Make all other modules non-public
All APIs used from outside the compiletest library crate have been isolated to
the `cli` and `rustdoc_gui_test` modules, so no other items need to be publicly
exported.
2025-10-09 14:34:01 +11:00
Zalathar
b4f64fda4f compiletest: Isolate APIs used by bin/main.rs 2025-10-09 14:34:01 +11:00
Zalathar
8f0815602c compiletest: Isolate APIs used by rustdoc-gui-test 2025-10-09 14:34:01 +11:00
bors
bd3487101f Auto merge of #143227 - tshepang:asm-label-operand, r=Amanieu
add multi-arch asm! label operand test

Added this since the other label operand tests are only for x86
2025-10-09 02:23:38 +00:00
Alex Crichton
4b6bc9a66b Update wasm-component-ld to 0.5.18
Keeping it up-to-date with upstream for the latest bug fixes and such
related to wasm-tools-implemented internals.
2025-10-08 13:20:42 -07:00
bors
7a52736039 Auto merge of #147475 - matthiaskrgr:rollup-iyrkv0g, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#144006 (clarify wording of match ergonomics diagnostics (`rust_2024_incompatible_pat` lint and error))
 - rust-lang/rust#147386 (some more `proc_macro` cleanups)
 - rust-lang/rust#147412 (Convert impossible cases in macro resolution into assertions)
 - rust-lang/rust#147464 (prefer repeat_n() over repeat().take())
 - rust-lang/rust#147469 (Add rustdoc crate name in error)
 - rust-lang/rust#147472 (refactor: replace `LLVMRustAtomicLoad/Store` with LLVM built-in functions)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-08 16:07:07 +00:00
sayantn
45ca537746
Port the Miri implementations of SIMD intrinsics to rustc_const_eval 2025-10-08 21:05:19 +05:30
Matthias Krüger
f6caa5f68f
Rollup merge of #147469 - Jamesbarford:fix/crate-error-message, r=GuillaumeGomez
Add rustdoc crate name in error

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

I'm not entirely sure if what I am doing with the span is correct
2025-10-08 15:39:28 +02:00
bors
910617d84d Auto merge of #147443 - krtab:dosreplaceonlywhenneeded, r=GuillaumeGomez
[rustdoc] a small performance improvement: only allocate new string if there are DOS backlines in highlight.rs

r? `@GuillaumeGomez`
2025-10-08 12:54:27 +00:00
James Barford-Evans
2c1e796ed0 Improve missing create level error message 2025-10-08 11:35:20 +01:00
Jana Dönszelmann
8356f6b18a
Rollup merge of #147448 - jyn514:reuse-submodules, r=kobzol
collect-license-metadata: update submodules before running

Previously, this could cause incorrect failures like the following:
```
diff --git a/license-metadata.json b/license-metadata.json
index 4fb59210854..b1291c00b94 100644
--- a/license-metadata.json
+++ b/license-metadata.json
`@@` -244,19 +172,6 `@@`
             },
             "name": "src/doc/rustc-dev-guide/mermaid.min.js",
             "type": "file"
-          },
-          {
-            "children": [],
-            "license": {
-              "copyright": [
-                "2003-2019 University of Illinois at Urbana-Champaign",
-                "2003-2019 by the contributors listed in CREDITS.TXT (7738295178/llvm/CREDITS.TXT)",
-                "2010 Apple Inc"
-              ],
-              "spdx": "Apache-2.0 WITH LLVM-exception AND NCSA"
-            },
-            "name": "src/llvm-project",
-            "type": "directory"
```

Additionally, this prints a warning if there were untracked files, which could cause a failure like the following:
```
diff --git a/license-metadata.json b/license-metadata.json
index 4fb59210854..ebf1c478282 100644
--- a/license-metadata.json
+++ b/license-metadata.json
`@@` -155,6 +155,22 `@@`
             "name": "src/librustdoc/html/static/fonts",
             "type": "directory"
           },
+          {
+            "directories": [],
+            "files": [
+              "2015-edition.txt",
+              "diagnostics.json",
+              "license.diff",
+              "test.fixed.rs"
+            ],
+            "license": {
+              "copyright": [
+                "NONE"
+              ],
+              "spdx": "NONE"
+            },
+            "type": "group"
+          },
           {
             "license": {
               "copyright": [
```

r? `@Kobzol` cc rust-lang/rust#147422
2025-10-08 10:06:57 +02:00
Jana Dönszelmann
291e12937b
Rollup merge of #146385 - notriddle:no-anim, r=GuillaumeGomez
rustdoc-search: redesign throbber to be less distracting

Preview: https://notriddle.com/rustdoc-html-demo-12/throbber/std/index.html

<img width="1920" height="182" alt="image" src="https://github.com/user-attachments/assets/da838ee0-3f7a-4b10-ba92-f9ac52e9f723" />

<img width="1920" height="182" alt="image" src="https://github.com/user-attachments/assets/b5a59fc0-5d07-4981-b1dd-0b60556a0dd5" />

<img width="1920" height="182" alt="image" src="https://github.com/user-attachments/assets/bb587660-7b6c-40e1-a7ae-2270d530dcd4" />

Complaints about it being distracting, and causing people to wait until all of the results are loaded instead of using the incremental results as they come in, make me think it was a bad idea to put it in the tab.

Part of https://github.com/rust-lang/rust/issues/146048
2025-10-08 10:06:54 +02:00
bors
4fd3181552 Auto merge of #147111 - BoxyUwU:rename_obligation_processing_apis, r=lcnr
rename `select_where_possible` and `select_all_or_error`

r? `@lcnr`

I find that people get confused by what these methods do. The verb "select" is not really that helpful and is just a reference to somewhat of an implementation detail of the trait solvers that doesn't even apply to most obligation kinds.

I went with `try_evaluate_obligations` and  `evaluate_obligations_error_on_ambiguity`. This maintains consistency with the new solvers `evalute_goal` entry point. it's unfortunate that we say obligations rather than goals but this maintains consistency with `register_obligation` functions which I think is a good thing. In the long term possibly we rename `Obligation` or `Goal` 🤷‍♀️
2025-10-07 23:57:38 +00:00
Boxy Uwu
8e9b0c4ca9 rename select_where_possible and select_all_or_error 2025-10-07 23:02:23 +01:00
bors
f6aa851dba Auto merge of #147453 - matthiaskrgr:rollup-z3db8zi, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#146865 (kcfi: only reify trait methods when dyn-compatible)
 - rust-lang/rust#147205 (Add a new `wasm32-wasip3` target to Rust)
 - rust-lang/rust#147322 (cg_llvm: Consistently import `llvm::Type` and `llvm::Value`)
 - rust-lang/rust#147398 (Fix; correct placement of type inference error for method calls)
 - rust-lang/rust#147410 (Update `S-waiting-on-team` refs to new `S-waiting-on-{team}` labels)
 - rust-lang/rust#147422 (collect-license-metadata: Print a diff of the expected output)
 - rust-lang/rust#147431 (compiletest: Read the whole test file before parsing directives)
 - rust-lang/rust#147433 (Fix doc comment)

Failed merges:

 - rust-lang/rust#147390 (Use globals instead of metadata for std::autodiff)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-07 20:47:13 +00:00
Michael Howell
6d4b4d9ef0 rustdoc-search: keep hourglass in searchbar 2025-10-07 11:51:50 -07:00
Matthias Krüger
7b2e9fb442
Rollup merge of #147431 - Zalathar:directive, r=jieyouxu
compiletest: Read the whole test file before parsing directives

Few tests are larger than a handful of kilobytes, and nowadays we scan the whole file for directives anyway, so there's little reason not to just read the whole thing up-front.

This avoids having to deal with I/O within `iter_directives`, which should make it easier to overhaul directive processing.

r? jieyouxu
2025-10-07 19:39:10 +02:00