Commit graph

165894 commits

Author SHA1 Message Date
bors
f13ef0d75d Auto merge of #146216 - LorrensP-2158466:miri-float-nondet-foreign-items-take2, r=RalfJung
Miri: non-deterministic floating point operations in foreign_items

Take 2 of rust-lang/rust#143906. The last 2 commits are what changed compared to the original pr.

Verified the tests using (fish shell):
```fish
env MIRIFLAGS="-Zmiri-max-extra-rounding-error -Zmiri-many-seeds" ./x miri --no-fail-fast std core coretests  -- f32 f64
```

r? `@RalfJung`
2025-09-07 10:46:38 +00:00
Matthias Krüger
4b9b0265a0
Rollup merge of #146200 - GuillaumeGomez:simplify-rustdoc-gui-tests, r=lolbinarycat
Simplify rustdoc-gui tester by calling directly browser-ui-test

The output and handling of `browser-ui-test` is now mostly the same as we did manually, so no need to keep our wrapper anymore. Lot of code removed! \o/

r? `@lolbinarycat`
2025-09-06 23:49:53 +02:00
LorrensP-2158466
e7e06aca38 Change stdlib float tests to account for miri nondet floats. 2025-09-06 21:45:17 +02:00
LorrensP-2158466
dcc342f449 Implement nondet behaviour and change/add tests. 2025-09-06 21:45:13 +02:00
bors
1ed3cd7030 Auto merge of #146233 - jieyouxu:run-make-fission, r=Kobzol
Split `run-make` into two {`run-make`,`run-make-cargo`} test suites

## Summary

Split `tests/run-make` into two test suites, to make it faster and more convenient for contributors to run run-make tests that do not need in-tree `cargo`.

| New test suites        | Explanation                                                                                                                                                                                                                              |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tests/run-make`       | The "fast path" test suite intended for run-make tests that do not need in-tree `cargo`. These tests may not use `cargo`.                                                                                                                |
| `tests/run-make-cargo` | The "slow path" test suite that requires checking out `cargo` submodule and building in-tree `cargo`, and thus will have access to in-tree `cargo`. In practice, these constitute a very small portion of the original `run-make` tests. |

This PR carries out [MCP 847: Split run-make test suite into slower-building test suite with suitably-staged cargo and faster-building test suite without cargo](https://github.com/rust-lang/compiler-team/issues/847).
Fixes rust-lang/rust#135573 (for the tests that do not need in-tree `cargo`).
Fixes rust-lang/rust#134109.

## Remarks

- I considered if we want to split by in-tree tools previously. However, as discussed rust-lang/rust#134109, in practice `rustdoc` is not very slow to build, but `cargo` takes a good few minutes. So, the partition boundary was determined to be along in-tree `cargo` availability.
- The `run-make` tests previously that wanted to use `cargo` cannot just use the bootstrap `cargo`, otherwise they would run into situations where bootstrap `cargo` can significantly diverge from in-tree `cargo` (see https://github.com/rust-lang/rust/pull/130642).

---

try-job: aarch64-msvc-1
try-job: test-various
try-job: x86_64-gnu-debug
try-job: aarch64-gnu-debug
try-job: aarch64-apple
try-job: dist-various-1
2025-09-06 18:37:35 +00:00
Guillaume Gomez
b0a8e3c767 Simplify rustdoc-gui tester by calling directly browser-ui-test 2025-09-06 20:34:26 +02:00
Matthias Krüger
6f5fad5dad
Rollup merge of #146266 - RalfJung:miri-nosys, r=jieyouxu
miri std tests: skip all of sys::

Matches https://github.com/rust-lang/miri-test-libstd/pull/104
2025-09-06 13:03:17 +02:00
Matthias Krüger
8fe82a0e9e
Rollup merge of #146263 - jieyouxu:check-bump-stage0, r=Kobzol
Fix `bump-stage0` build failure, and check-build `bump-stage0` in CI

This PR bumps the `toml` dependency of the `bump-stage0` tool to `0.8.23`, which AFAICT is the highest `toml` version that's present in the r-l/r workspace's `Cargo.lock` already (so we don't introduce _another_ `toml 0.x.*` series). I added some byte-buffer-to-string intermediary to workaround `toml 0.8.*` not having the `toml 0.9.*` `toml::from_slice` API.

To catch obvious build failures of the `src/tools/bump-stage0` tool early, before we find out it can't even build when we really need it to work.

Contexts:

- https://github.com/rust-lang/rust/pull/146250#issue-3388327410
- [#t-release > Bump stage0 rustfmt separately ("one-off") @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/241545-t-release/topic/Bump.20stage0.20rustfmt.20separately.20.28.22one-off.22.29/near/537916615)

Fixes rust-lang/rust#146252.
2025-09-06 13:03:17 +02:00
Ralf Jung
9fc8374c2c miri std tests: skip all of sys:: 2025-09-06 11:07:19 +02:00
Jieyou Xu
312a1240a3
ci: check src/tools/bump-stage0 in pr-check-2
To catch obvious build failures of the `src/tools/bump-stage0` early,
before we find out it can't even build when we really need it to work.
2025-09-06 16:33:12 +08:00
Jieyou Xu
d5e61216a7
bootstrap: add check step for src/tools/bump-stage0 2025-09-06 16:33:11 +08:00
Jieyou Xu
5f372fe7d1
bump-stage0: pick highest common toml version, add a workaround
- We pick the higest common `toml` version used in the r-l/r workspace
  to avoid introducing Yet Another `toml` `0.x` version, which happens
  to be `0.8.23` as of the time of writing.
- We introduce a byte-buffer-to-string workaround for the `toml 0.8.*`
  series that do not have the `toml 0.9.*` series's `toml::from_slice`
  API yet. Not efficient, but this is not perf-critical so it's fine.
2025-09-06 16:33:11 +08:00
bors
0d0f4eac8b Auto merge of #146253 - Kobzol:cargo-lto, r=jieyouxu
Optimize Cargo with LTO

This optimization was "lost" when Cargo was switched away from a `ToolRustcPrivate` to a `ToolTarget` tool.

r? `@jieyouxu`
2025-09-06 06:43:38 +00:00
Trevor Gross
14415c75ad
Rollup merge of #146199 - Kobzol:bootstrap-cargo-doc, r=jieyouxu
Document Cargo with in-tree rustdoc

Fixes https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/nightly.20rust.20doc.20seem.20corrupted.

r? `@jieyouxu`

try-job: dist-x86_64-linux-alt
2025-09-05 20:10:00 -04:00
León Orell Valerian Liehr
55a62d57ed
Rollup merge of #146250 - fmease:bump-stage0-rustfmt, r=Mark-Simulacrum
Bump stage0 rustfmt

Unblocks rust-lang/rust#146071, cc `@npmccallum.`

Steps to reproduce:

1. Temporarily upgrade `src/tools/bump-stage0`'s `toml` dependency from 0.7 to 0.9 to fix build error (see Zulip topic)
2. Execute `./x run src/tools/bump-stage0`
3. Manually revert changes unrelated to nightly `rustfmt`+`rustc` (the latter needs to be bumped, too, for the driver ([via](https://github.com/rust-lang/rust/pull/146250#discussion_r2325742775)))

r? `@Mark-Simulacrum` as discussed in [#t-release > Bump stage0 rustfmt separately ("one-off")](https://rust-lang.zulipchat.com/#narrow/channel/241545-t-release/topic/Bump.20stage0.20rustfmt.20separately.20.28.22one-off.22.29/with/537916615)
2025-09-05 22:47:24 +02:00
León Orell Valerian Liehr
d82ee660d6
Rollup merge of #146234 - hkBst:file-generated-header, r=tgross35
change file-is-generated doc comment to inner

Alternatively this could perhaps be better as a normal comment...
2025-09-05 22:47:22 +02:00
León Orell Valerian Liehr
7e189a00eb
Rollup merge of #146041 - lolbinarycat:tidy-escheck-bless, r=Kobzol
tidy: --bless now makes escheck run with --fix

this mirrors how other extra-check tools work.

unsure if this also needs to be done for tsc and es-check.
2025-09-05 22:47:20 +02:00
León Orell Valerian Liehr
9edce86bbd
Rollup merge of #145735 - joshtriplett:style-guide-trailing-whitespace, r=joshtriplett
style-guide: Document absence of trailing whitespace

We didn't previously have a blanket prohibition on trailing whitespace. Adding
one, inspired by discussion in https://github.com/rust-lang/rust/pull/145617 .
2025-09-05 22:47:19 +02:00
León Orell Valerian Liehr
90f51016a6
Rollup merge of #139113 - folkertdev:sanitizer-unstable-book-check-block, r=rcvalle
unstable book: in a sanitizer example, check the code

Use some `#` directives to make sure the code checks on x86_64, and does not produce errors on other platforms. This example still used an older version of `#[naked]`, and because the snippet was ignored that was missed before.

I'm not sure when this gets built on CI exactly, so it might be worthwhile to try and build it for a non-x86_64 architecture to make sure that works. I'm not sure how to verify locally that e.g. on aarch64 this code works without errors/warnings.

try-job: aarch64-apple
try-job: x86_64-msvc-2
2025-09-05 22:47:18 +02:00
León Orell Valerian Liehr
33baaafa34
Bump stage0 rustfmt 2025-09-05 20:20:09 +02:00
Jakub Beránek
edb92a33d7
Optimize Cargo with LTO 2025-09-05 20:03:08 +02:00
Jakub Beránek
b5c139baed
Fix condition 2025-09-05 19:57:08 +02:00
bors
99317ef14d Auto merge of #146121 - Muscraft:filter-suggestion-parts, r=petrochenkov
fix: Filter suggestion parts that match existing code

While testing my changes to make `rustc` use `annotate-snippets`, I encountered a new `clippy` test failure stemming from [two](https://github.com/rust-lang/rust/pull/145273/files#diff-6e8403e31463539666afbc00479cb416dc767a518f562b6e2960630953ee7da2R275-R278) [suggestion](https://github.com/rust-lang/rust/pull/145273/files#diff-6e8403e31463539666afbc00479cb416dc767a518f562b6e2960630953ee7da2R289-R292) output changes in rust-lang/rust#145273. The new output in these two cases feels like a regression as it is not as clear as the old output, and adds unnecessary information.

Before rust-lang/rust#145273 (`Diff` style)
![before](https://github.com/user-attachments/assets/36f33635-cbce-45f1-823d-0cbe6f0cfe46)

After rust-lang/rust#145273 ("multi-line" style)
![after](https://github.com/user-attachments/assets/d4cb00b8-5a42-436e-9329-db84347138f0)

The reason for the change was that a new suggestion part (which matches existing code) was added on a different line than the existing parts, causing the suggestion style to change from `Diff` to "multi-line". Since this new part matches existing code, no code changes show up in the output for it, but it still makes the suggestion style "multi-line" when it doesn't need to be.

To get the old output back, I made it so that suggestion parts that perfectly match existing code get filtered out.

try-job: aarch64-apple
2025-09-05 17:31:56 +00:00
Jakub Beránek
8c93cdc8e0
Add a comment about the "specialization" feature required because of im-rc 2025-09-05 17:02:12 +02:00
Jakub Beránek
4375e9d313
Add snapshot test for disting compiler docs 2025-09-05 16:24:43 +02:00
Jakub Beránek
a6aa509687
Respect top stage when documenting Cargo 2025-09-05 16:22:52 +02:00
Jakub Beránek
9f9473f201
Allow specialization feature when documenting Cargo 2025-09-05 16:20:53 +02:00
Jieyou Xu
f755e64c36
rustc-dev-guide: update docs for run-make-cargo 2025-09-05 21:39:52 +08:00
Jieyou Xu
34158add05
tidy: account for moved tests/run-make/uefi-qemu 2025-09-05 21:39:51 +08:00
Jieyou Xu
c959d3a541
ci: update jobs to also run tests/run-make-cargo
For the ones that explicitly picks which test suite to run.
2025-09-05 21:39:49 +08:00
Jieyou Xu
aebcbe0a4b
run-make-support: handle unavailable in-tree cargo under run-make test suite 2025-09-05 21:22:50 +08:00
Jieyou Xu
f220710ace
compiletest: implement {run-make,run-make-cargo} test suite split
- `run-make` test suite will now no longer receive a `cargo`.
    - NOTE: the user could technically still write
      `Command::new("cargo")` which might find *a* cargo from the
      environment, but that is not a supported case.
- `run-make-cargo` will receive a built in-tree `cargo`.
2025-09-05 21:22:50 +08:00
Jieyou Xu
0f76784d72
bootstrap: split run-make into {run-make,run-make-cargo} test suites
So that contributors who don't need to run `run-make` tests that require
in-tree `cargo` can run the non-cargo `run-make` tests without having to
wait for `cargo` (which would require rebuilding as the build cache
would be invalidated by compiler modifications without some kind of
`--keep-stage-cargo`).
2025-09-05 21:22:50 +08:00
Marijn Schouten
98e10290c9 change file-is-generated doc comment to inner 2025-09-05 10:08:45 +00:00
bors
91edc3ebcc Auto merge of #146218 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2025-09-05 02:01:50 +00:00
Scott Schafer
b307a1146b
fix: Filter suggestion parts that match existing code 2025-09-04 17:42:13 -06:00
Philipp Krones
75b9ee5f08
Merge commit 'e9b70454e4' into clippy-subtree-update 2025-09-04 18:27:27 -04:00
bors
af00ff2ce6 Auto merge of #145911 - notriddle:stringdex-tweak-3, r=GuillaumeGomez
rustdoc-search: yet another stringdex optimization attempt

This one's uses a different tactic. It shouldn't significantly increase the amount of downloaded index data, but still reduces the amount of disk usage.

This one works by changing the suffix-only node representation to omit some data that's needed for checking. Since those nodes make up the bulk of the tree, it reduces the data they store, but also requires validating the match by fetching the name itself (but the names list is pretty small, and when I tried it with wordnet "indexing" it was about the same).

r? `@GuillaumeGomez`
2025-09-04 19:40:40 +00:00
LorrensP-2158466
fd479ca23c Move float non determinism helpers to math.rs 2025-09-04 19:26:10 +02:00
Matthias Krüger
bdfa97b648
Rollup merge of #146151 - FrancescoV1985:issue-146047-fix, r=Kobzol
fixes auto-run js checks in tidy

Modified is_non_auto_or_matches function in src/tools/tidy/src/extra_checks/mod.rs so that .ts extension is considered.
Tested locally with
`./x.py test tidy --extra-checks=auto:js`
2025-09-04 17:45:48 +02:00
Matthias Krüger
7260704178
Rollup merge of #145976 - beepster4096:configure_debugbreak, r=clubby789
Add bootstrap.toml option to control debug breaking on ICEs on windows

When rustc ICEs during bootstrap on Windows, it will call `DebugBreak`. This is intended to trigger a Windows Error Reporting dialog that can launch a debugger. However on some setups (mine for one) this will just abort the process, hiding any ICEs on other threads as well. I also would not want to see this dialog even if it did work for me.

This PR adds a new option to bootstrap.toml `rust.break-on-ice` to configure this behavior. By default, it is enabled, matching the existing behavior.
2025-09-04 17:45:47 +02:00
Jakub Beránek
b5f2a71f55
Document Cargo with in-tree rustdoc 2025-09-04 14:19:22 +02:00
bors
45b9d13b45 Auto merge of #146192 - jhpratt:rollup-mam0bss, r=jhpratt
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#145682 (Promote aarch64-pc-windows-msvc to Tier 1)
 - rust-lang/rust#145690 (Implement Integer funnel shifts)
 - rust-lang/rust#146119 (compiletest: Implement an experimental `--new-output-capture` mode)
 - rust-lang/rust#146168 (Update bootstrap's dependencies to remove winapi and old windows-sys)
 - rust-lang/rust#146182 (Don't require next-solver `ProbeRef` to be `Copy`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-04 08:50:59 +00:00
FrancescoV1985
858414b6bb improved solution for function is_non_auto_or_matches 2025-09-04 08:55:02 +02:00
Jacob Pratt
fbaf7ffba5
Rollup merge of #146168 - dpaoliello:bootstrapdeps, r=jieyouxu
Update bootstrap's dependencies to remove winapi and old windows-sys

Bumps `opener` to 0.8 and `junction` to 1.3 - this removes the dependency on `winapi` (unless the `build-metrics` feature is enabled) and replaces the usage of `windows-sys` 0.52 with 0.60.

Together this means that bootstrap can now be built for Arm64EC.
2025-09-04 01:43:22 -04:00
Jacob Pratt
be1d829910
Rollup merge of #146119 - Zalathar:capture, r=jieyouxu
compiletest: Implement an experimental `--new-output-capture` mode

Thanks to the efforts on rust-lang/rust#140192, compiletest no longer has an unstable dependency on libtest, but it still has an unstable dependency on `#![feature(internal_output_capture)]`. That makes building compiletest more complicated than for most other bootstrap tools.

This PR therefore adds opt-in support for an experimental compiletest mode that avoids the use of `internal_output_capture` APIs, and instead uses more mundane means to capture the output of individual test runners.

Each `TestCx` now contains `&dyn ConsoleOut` references for stdout and stderr. All print statements in `compiletests::runtest` have been replaced with `write!` or `writeln!` calls that explicitly write to one of those trait objects. The underlying implementation then forwards to `print!` or `eprint!` (for `--no-capture` or old-output-capture mode), or writes to a separate buffer (in new-output-capture mode).

---

Currently, new-output-capture is disabled by default. It can be explicitly enabled in one of two ways:

- When running `x test`, pass `--new-output-capture=on` as a *compiletest* argument (after `--`).
  - E.g. `x test ui -- --new-output-capture=on`.
  - The short form is `-Non` or `-Ny`.
- Set environment variable `COMPILETEST_NEW_OUTPUT_CAPTURE=on`.

After some amount of opt-in testing, new-output-capture will become the default (with a temporary opt-out). Eventually, old-output-capture and `#![feature(internal_output_capture)]` will be completely removed from compiletest.

r? jieyouxu
2025-09-04 01:43:21 -04:00
Jacob Pratt
00d5dc5c9d
Rollup merge of #145690 - sayantn:integer-funnel-shift, r=tgross35
Implement Integer funnel shifts

Tracking issue: rust-lang/rust#145686
ACP: https://github.com/rust-lang/libs-team/issues/642

This implements funnel shifts on primitive integer types. Implements this for cg_llvm, with a fallback impl for everything else

Thanks `@folkertdev` for the fixes and tests

cc `@rust-lang/libs-api`
2025-09-04 01:43:21 -04:00
Jacob Pratt
4c091fb9ed
Rollup merge of #145682 - dpaoliello:arm64tier1, r=jieyouxu
Promote aarch64-pc-windows-msvc to Tier 1

Per <https://github.com/rust-lang/rfcs/pull/3817>

Tracking issue: <https://github.com/rust-lang/rust/issues/145671>
2025-09-04 01:43:20 -04:00
bors
79bdc62756 Auto merge of #146176 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

12 commits in a6c58d43051d01d83f55a3e61ef5f5b2b0dd6bd9..761c4658d0079d607e6d33cf0c060e61a617cad3
2025-08-26 23:05:12 +0000 to 2025-09-04 01:25:01 +0000
- refactor(shell): Prepare for `Report`s being generated in more places (rust-lang/cargo#15920)
- refactor(frontmatter): Pull out as a dedicated mod (rust-lang/cargo#15914)
- chore: downgrade to libc@0.2.174 (rust-lang/cargo#15918)
- fix(publish): Don't generate final artifacts (rust-lang/cargo#15910)
- chore: Address most typos (rust-lang/cargo#15911)
- chore(deps): update rust crate annotate-snippets to 0.12.1 (rust-lang/cargo#15909)
- test(script): Switch frontmatter tests to end-to-end (rust-lang/cargo#15899)
- chore: fix some typos and grammar (rust-lang/cargo#15905)
- Update dependencies (rust-lang/cargo#15904)
- feat: Don't stop at first error when emitting lints and warnings (rust-lang/cargo#15889)
- fix(cli): Show the bad manifest path (rust-lang/cargo#15896)
- chore(deps): update rust crate tracing-subscriber to v0.3.20 [security] (rust-lang/cargo#15898)
2025-09-04 05:37:47 +00:00
Weihang Lo
94fd69aa28
Update cargo submodule 2025-09-03 22:30:01 -07:00