Commit graph

165923 commits

Author SHA1 Message Date
Ralf Jung
21e3111ef9 refactor weak-mem test to list all expected executions 2025-09-10 16:35:17 +02:00
Ralf Jung
0e0b254df9 ensure we do not see the inconsistent execution from Figure 8 2025-09-10 16:16:49 +02:00
Ralf Jung
edbc0a08fb weak memory tests: add more info on where they come from 2025-09-10 16:09:28 +02:00
Ralf Jung
84e1950065 move math foreign_items into their own file 2025-09-08 13:22:21 +02:00
Ralf Jung
e00051299a extract core operation name instead of listing all function name variants 2025-09-08 13:22:21 +02:00
Ralf Jung
94ab2b9f15 move math intrinsics to their own file 2025-09-08 13:22:21 +02:00
Ralf Jung
24ce839fb9 clippy 2025-09-08 12:00:36 +02:00
Ralf Jung
c4d12688e3 Merge ref 'a09fbe2c83' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: a09fbe2c83
Filtered ref: e8da14f32630072c76aeb944454175f4d8266918

This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-08 12:00:24 +02:00
Ralf Jung
deca4895ca Prepare for merging from rust-lang/rust
This updates the rust-version file to a09fbe2c83.
2025-09-08 11:57:19 +02:00
Ralf Jung
211461a4d5
Merge pull request #4566 from Patrick-6/miri-genmc-rmw
Add more features for GenMC mode (RMW, fences, new printing options)
2025-09-08 06:24:22 +00:00
Ralf Jung
344b4ac427 print proper error when using unsupported synchronization primitive with GenMC 2025-09-08 07:55:10 +02:00
Patrick-6
61af5da8df Implement more features for GenMC mode
- Support for atomic fences.
- Support for atomic read-modify-write (RMW).
- Add tests using RMW and fences.
- Add options:
  - to disable weak memory effects in GenMC mode.
  - to print GenMC execution graphs.
  - to print GenMC output message.
- Fix GenMC full rebuild issue and run configure step when commit changes.
- Do cleanup.

Co-authored-by: Ralf Jung <post@ralfj.de>
2025-09-07 23:51:17 +02:00
Matthias Krüger
cb64a77550
Rollup merge of #146170 - kumarUjjawal:master, r=Mark-Simulacrum
fix: offline rustdoc html missing favicon

As discussed in the rust-lang/rust#146149 the doc was missing the favicon icon when build locally and viewed on a browser. I changed the relative path and also now we explicitly copy both SVG and PNG.

<img width="1132" height="425" alt="Screenshot 2025-09-03 at 11 57 46 PM" src="https://github.com/user-attachments/assets/062cbb08-04ec-4d88-a43a-710fb6190f82" />
2025-09-07 20:02:27 +02:00
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
Ralf Jung
69c7652a01 atomic rmw intrinsics: RHS must be an integer 2025-09-05 13:32:25 +02:00
Ralf Jung
0dcc21b124
Merge pull request #4569 from RalfJung/atomic-rmw
atomics: unify handling min/max and the other RMWs
2025-09-05 10:46:21 +00:00
Ralf Jung
1186db896e atomics: unify handling min/max and the other RMWs 2025-09-05 12:15:33 +02:00
Marijn Schouten
98e10290c9 change file-is-generated doc comment to inner 2025-09-05 10:08:45 +00:00