Skip to content

Rustc pull #2283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 112 commits into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
912575e
Update documentation
Kobzol Feb 11, 2025
940f431
Auto merge of #136921 - Kobzol:gcc-build, r=onur-ozkan
bors Feb 26, 2025
0d3b748
Auto merge of #137036 - jieyouxu:drivers-license, r=Kobzol
bors Feb 26, 2025
fb3634e
Auto merge of #137354 - FractalFir:intern_with_cap, r=FractalFir
bors Feb 26, 2025
ade1261
Rollup merge of #134585 - cyrgani:uninit_array, r=Amanieu
fmease Feb 26, 2025
fde88fb
Rollup merge of #136187 - hkBst:patch-27, r=workingjubilee
fmease Feb 26, 2025
f41ac06
Rollup merge of #137631 - TaKO8Ki:issue-137508, r=compiler-errors
fmease Feb 26, 2025
99bcfbc
Rollup merge of #137642 - BoxyUwU:rdg-push, r=Kobzol
fmease Feb 26, 2025
4a50ef7
Rollup merge of #137660 - Kobzol:gcc-update, r=GuillaumeGomez
fmease Feb 26, 2025
df0d5f4
Rollup merge of #137670 - RalfJung:llvm-commit-logic-revert, r=Kobzol
fmease Feb 26, 2025
4b7bbd7
Rollup merge of #137671 - meithecatte:discoverable-dump-mir, r=Nadrieril
fmease Feb 26, 2025
8044303
Support raw-dylib link kind on ELF
Noratrieb Jan 18, 2025
4aa84a5
Auto merge of #137688 - fmease:rollup-gbeuj9j, r=fmease
bors Feb 26, 2025
0a9e5c4
Auto merge of #132295 - the8472:remove-randomize-exclusion1, r=onur-o…
bors Feb 27, 2025
9be4329
Auto merge of #137669 - DianQK:fn-atts-virtual, r=saethlin
bors Feb 28, 2025
a2f0e0b
Auto merge of #133250 - DianQK:embed-bitcode-pgo, r=nikic
bors Mar 1, 2025
6a61f6f
rustc-dev-guide: remove mentions of legacy `Makefile` run-make infra
jieyouxu Feb 5, 2025
a522bd0
Auto merge of #136864 - Kobzol:citool, r=marcoieni
bors Mar 2, 2025
fe86e77
Auto merge of #137425 - yotamofek:pr/rustdoc/return-impl-display-redu…
bors Mar 2, 2025
8b72496
Auto merge of #137661 - nikic:llvm20-rc3, r=cuviper
bors Mar 2, 2025
ed06554
Auto merge of #137704 - nnethercote:opt-empty-prov-range-checks, r=ol…
bors Mar 2, 2025
4801165
Remove some unnecessary aliases from `rustc_data_structures::sync`
Zalathar Mar 3, 2025
cf3f317
Rollup merge of #137852 - moulins:layout-nonarray-simd-deadcode, r=wo…
matthiaskrgr Mar 3, 2025
75dbb05
Rollup merge of #137882 - onur-ozkan:remove-extra-compiler-stage, r=K…
matthiaskrgr Mar 3, 2025
3d5f177
Rollup merge of #137894 - compiler-errors:no-scalar-pair-opt, r=oli-obk
matthiaskrgr Mar 3, 2025
f7bad03
Rollup merge of #137922 - Zalathar:sharded, r=SparrowLii
matthiaskrgr Mar 3, 2025
3089471
Rollup merge of #137939 - speedy-lex:shl-fix, r=Noratrieb
matthiaskrgr Mar 3, 2025
885d490
Rollup merge of #137946 - ehuss:ci-docker-readme, r=Kobzol
matthiaskrgr Mar 3, 2025
9512e5d
Rollup merge of #137955 - Noratrieb:rustdoc-json-long-lines, r=aDotIn…
matthiaskrgr Mar 3, 2025
1ece9eb
Rollup merge of #137958 - aDotInTheVoid:aDotInTheVoid-patch-2, r=jiey…
matthiaskrgr Mar 3, 2025
cc4c680
Auto merge of #137959 - matthiaskrgr:rollup-62vjvwr, r=matthiaskrgr
bors Mar 4, 2025
cd733e5
Auto merge of #135695 - Noratrieb:elf-raw-dylib, r=bjorn3
bors Mar 4, 2025
724c83e
Auto merge of #135186 - camelid:const-path-multi, r=BoxyUwU
bors Mar 4, 2025
63aab5f
Rollup merge of #134063 - tgross35:dec2flt-refactoring, r=Noratrieb
jieyouxu Mar 5, 2025
a1c5c49
Rollup merge of #136581 - jieyouxu:makefile-be-gone, r=Kobzol
jieyouxu Mar 5, 2025
6393814
Rollup merge of #136662 - thaliaarchi:formatter-pad-char-count, r=m-o…
jieyouxu Mar 5, 2025
9371ec7
Rollup merge of #136764 - traviscross:TC/make-ptr_cast_add_auto_to_ob…
jieyouxu Mar 5, 2025
75a7b7e
Rollup merge of #136798 - pcorwin:master, r=tgross35
jieyouxu Mar 5, 2025
b210d96
Rollup merge of #136865 - jieyouxu:long-type-path-compare-mode, r=lqd
jieyouxu Mar 5, 2025
f6e43bf
Rollup merge of #136975 - jyn514:macos-x, r=Mark-Simulacrum
jieyouxu Mar 5, 2025
2a985fe
Rollup merge of #136977 - Kobzol:citool-datadog, r=marcoieni
jieyouxu Mar 5, 2025
99ec9ab
Rollup merge of #137240 - jieyouxu:remove_dir_all, r=Mark-Simulacrum
jieyouxu Mar 5, 2025
e946551
Rollup merge of #137298 - compiler-errors:mir-wf, r=lcnr
jieyouxu Mar 5, 2025
87ef415
Rollup merge of #137463 - sunshowers:illumos-posix-spawn, r=Mark-Simu…
jieyouxu Mar 5, 2025
95a3592
Rollup merge of #137477 - Ayush1325:uefi-service-binding, r=Noratrieb
jieyouxu Mar 5, 2025
ca26397
Rollup merge of #137569 - aDotInTheVoid:for-iurii, r=ibraheemdev
jieyouxu Mar 5, 2025
8eeac16
Rollup merge of #137633 - compiler-errors:no-implied-bounds-hack-unle…
jieyouxu Mar 5, 2025
c5d929d
Rollup merge of #137679 - bjorn3:coretests_improvements, r=jieyouxu,o…
jieyouxu Mar 5, 2025
03af53f
Rollup merge of #137723 - onur-ozkan:cfg-ver-description, r=pietroalb…
jieyouxu Mar 5, 2025
32b3c78
Rollup merge of #137728 - Darksonn:no-tuple-unsize, r=oli-obk
jieyouxu Mar 5, 2025
49c57bf
Rollup merge of #137731 - SparrowLii:waiter, r=nnethercote
jieyouxu Mar 5, 2025
9bc35c0
Rollup merge of #137875 - Zalathar:irrefutable, r=Nadrieril
jieyouxu Mar 5, 2025
2f1b400
Rollup merge of #138028 - workingjubilee:is-rustic-abi, r=compiler-er…
jieyouxu Mar 5, 2025
7efb58d
Auto merge of #138058 - jieyouxu:rollup-skdt0oz, r=jieyouxu
bors Mar 5, 2025
309c805
Auto merge of #137907 - compiler-errors:inline-fnonce, r=saethlin
bors Mar 5, 2025
97de634
Auto merge of #138039 - onur-ozkan:handle-forced-compiler-on-tools, r…
bors Mar 6, 2025
93eca2b
Document that `rmake.rs`/`run-make-support` may not use unstable feat…
jieyouxu Feb 24, 2025
949237f
Rollup merge of #137337 - dalvescb:master, r=petrochenkov
jhpratt Mar 8, 2025
b325706
Rollup merge of #137363 - workingjubilee:untangle-x86-abi-impl, r=jie…
jhpratt Mar 8, 2025
b423d96
Rollup merge of #137537 - jieyouxu:daily-rmake, r=Kobzol
jhpratt Mar 8, 2025
dac70c8
Rollup merge of #137606 - davidtwco:next-edition, r=traviscross,ehuss
jhpratt Mar 8, 2025
e198638
Rollup merge of #137957 - Noratrieb:no, r=wesleywiser
jhpratt Mar 8, 2025
5b8c273
Rollup merge of #138000 - RalfJung:atomic-rmw, r=Amanieu
jhpratt Mar 8, 2025
c0aa4af
Rollup merge of #138013 - Kobzol:ci-post-merge-analysis, r=marcoieni
jhpratt Mar 8, 2025
3e31e63
Rollup merge of #138033 - obi1kenobi:pg/json-attrs-tests, r=aDotInThe…
jhpratt Mar 8, 2025
bb31cbe
Rollup merge of #138137 - ZequanWu:fix-triple, r=cuviper
jhpratt Mar 8, 2025
ca28c5a
Rollup merge of #138173 - compiler-errors:incoherent-negative-impl, r…
jhpratt Mar 8, 2025
71f6da3
Rollup merge of #138184 - thaliaarchi:unauthenticated-ci-spurious, r=…
jhpratt Mar 8, 2025
3b547b8
Rollup merge of #138187 - matthiaskrgr:rmclone, r=cjgillot
jhpratt Mar 8, 2025
105390d
Auto merge of #138202 - jhpratt:rollup-kqrl5xn, r=jhpratt
bors Mar 8, 2025
639cede
Auto merge of #138205 - onur-ozkan:fix-build-cycle, r=jieyouxu
bors Mar 8, 2025
78a809f
Auto merge of #137500 - scottmcm:trunc-br, r=saethlin
bors Mar 8, 2025
321f5ba
Auto merge of #137502 - compiler-errors:global-asm-aint-mir-body, r=o…
bors Mar 8, 2025
ceecf71
Auto merge of #137513 - scottmcm:identity-transmute, r=saethlin
bors Mar 9, 2025
ff1c2b2
Auto merge of #137541 - onur-ozkan:fix-cargo-clippy-bin, r=jieyouxu
bors Mar 9, 2025
8745ead
Auto merge of #137563 - FractalFir:dep_graph_cap, r=nnethercote
bors Mar 9, 2025
9bb1479
Auto merge of #137655 - nnethercote:split-edges-iterator, r=nnethercote
bors Mar 9, 2025
56f7ce7
Auto merge of #137695 - nnethercote:always-inline-query_get_at, r=sae…
bors Mar 9, 2025
7f76593
Auto merge of #138200 - weihanglo:update-cargo, r=weihanglo
bors Mar 10, 2025
074e478
Modify try-job documentation
Kobzol Mar 10, 2025
dd03594
Handle backticks in try job patterns
Kobzol Mar 10, 2025
eb9d046
Auto merge of #137586 - nnethercote:SetImpliedBits, r=bjorn3
bors Mar 11, 2025
2df67fb
Rollup merge of #135987 - hkBst:patch-20, r=joboet
Kobzol Mar 11, 2025
80e102f
Rollup merge of #137967 - mustartt:fix-aix-test-hangs, r=workingjubilee
Kobzol Mar 11, 2025
71d337b
Rollup merge of #138147 - daltenty:patch-1, r=jieyouxu
Kobzol Mar 11, 2025
2ce0b8f
Rollup merge of #138307 - Kobzol:citool-alias, r=marcoieni
Kobzol Mar 11, 2025
62850cc
Rollup merge of #138315 - matthiaskrgr:nextback, r=fmease
Kobzol Mar 11, 2025
a20a24d
Rollup merge of #138330 - nnethercote:rm-lints-rust-sections, r=jieyouxu
Kobzol Mar 11, 2025
00f083a
Rollup merge of #138335 - jieyouxu:fix-citool, r=marcoieni
Kobzol Mar 11, 2025
ec1915f
Auto merge of #138350 - Kobzol:rollup-4kj94rq, r=Kobzol
bors Mar 11, 2025
22d3cd9
Auto merge of #128440 - oli-obk:defines, r=lcnr
bors Mar 11, 2025
7f5b5c3
Move methods from `Map` to `TyCtxt`, part 4.
nnethercote Feb 21, 2025
146c931
Auto merge of #137795 - Jarcho:idx_opt, r=davidtwco
bors Mar 12, 2025
7d3361f
Auto merge of #138052 - lqd:lld-linker-messages, r=jieyouxu
bors Mar 12, 2025
440b6ba
Auto merge of #137612 - Kobzol:bootstrap-2024, r=onur-ozkan
bors Mar 12, 2025
4574a77
Auto merge of #138083 - nnethercote:rm-NtItem-NtStmt, r=petrochenkov
bors Mar 12, 2025
a879001
Rollup merge of #134076 - GrigorenkoPV:InvalidFilename, r=joboet
Manishearth Mar 12, 2025
0d36dfa
Rollup merge of #137504 - nnethercote:remove-Map-4, r=Zalathar
Manishearth Mar 12, 2025
89f2c40
Rollup merge of #138175 - sam-mccall:binobj, r=nnethercote
Manishearth Mar 12, 2025
9becb7c
Rollup merge of #138259 - compiler-errors:disentangle-ribs, r=BoxyUwU
Manishearth Mar 12, 2025
fda8a73
Rollup merge of #138280 - folkertdev:mir-dump-asm-const, r=compiler-e…
Manishearth Mar 12, 2025
7866133
Rollup merge of #138318 - lolbinarycat:rustdoc-js-less-expect-error-p…
Manishearth Mar 12, 2025
0cc67f6
Rollup merge of #138331 - nnethercote:use-RUSTC_LINT_FLAGS-more, r=on…
Manishearth Mar 12, 2025
c2c37d0
Rollup merge of #138357 - lcnr:goodbye-TypeVerifier-rarw, r=compiler-…
Manishearth Mar 12, 2025
eeb9233
Rollup merge of #138394 - lcnr:yeet-variant, r=compiler-errors
Manishearth Mar 12, 2025
87f7ca9
Rollup merge of #138403 - Bryanskiy:delegation-ice-2, r=petrochenkov
Manishearth Mar 12, 2025
a8c39aa
Rollup merge of #138407 - Bryanskiy:delegation-variadic, r=petrochenkov
Manishearth Mar 12, 2025
a231189
Rollup merge of #138409 - xingxue-ibm:use-sigaction, r=compiler-errors
Manishearth Mar 12, 2025
49fb487
Auto merge of #138076 - tmiasko:pred-count, r=matthewjasper
bors Mar 12, 2025
53a1b3d
Auto merge of #138416 - Manishearth:rollup-fejor9p, r=Manishearth
bors Mar 13, 2025
2aa579f
Preparing for merge from rustc
jieyouxu Mar 13, 2025
3ca2a42
Merge from rustc
jieyouxu Mar 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4ecd70ddd1039a3954056c1071e40278048476fa
8536f201ffdb2c24925d7f9e87996d7dca93428b
2 changes: 1 addition & 1 deletion src/building/optimized-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ Here is an example of how can `opt-dist` be used locally (outside of CI):
[`Environment`]: https://github.com/rust-lang/rust/blob/ee451f8faccf3050c76cdcd82543c917b40c7962/src/tools/opt-dist/src/environment.rs#L5

> Note: if you want to run the actual CI pipeline, instead of running `opt-dist` locally,
> you can execute `python3 src/ci/github-actions/ci.py run-local dist-x86_64-linux`.
> you can execute `cargo run --manifest-path src/ci/citool/Cargo.toml run-local dist-x86_64-linux`.
4 changes: 2 additions & 2 deletions src/hir.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ defined in the map. By matching on this, you can find out what sort of
node the `HirId` referred to and also get a pointer to the data
itself. Often, you know what sort of node `n` is – e.g. if you know
that `n` must be some HIR expression, you can do
[`tcx.hir().expect_expr(n)`][expect_expr], which will extract and return the
[`tcx.hir_expect_expr(n)`][expect_expr], which will extract and return the
[`&hir::Expr`][Expr], panicking if `n` is not in fact an expression.

[find]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/hir/map/struct.Map.html#method.find
[`Node`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/enum.Node.html
[expect_expr]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/hir/map/struct.Map.html#method.expect_expr
[expect_expr]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TyCtxt.html#method.expect_expr
[Expr]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.Expr.html

Finally, you can use the HIR map to find the parents of nodes, via
Expand Down
2 changes: 0 additions & 2 deletions src/parallel-rustc.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ are implemented differently depending on whether `parallel-compiler` is true.

| data structure | parallel | non-parallel |
| -------------------------------- | --------------------------------------------------- | ------------ |
| OnceCell | std::sync::OnceLock | std::cell::OnceCell |
| Lock\<T> | (parking_lot::Mutex\<T>) | (std::cell::RefCell) |
| RwLock\<T> | (parking_lot::RwLock\<T>) | (std::cell::RefCell) |
| MTRef<'a, T> | &'a T | &'a mut T |
| MTLock\<T> | (Lock\<T>) | (T) |
| ReadGuard | parking_lot::RwLockReadGuard | std::cell::Ref |
| MappedReadGuard | parking_lot::MappedRwLockReadGuard | std::cell::Ref |
Expand Down
34 changes: 21 additions & 13 deletions src/tests/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Our CI is primarily executed on [GitHub Actions], with a single workflow defined
in [`.github/workflows/ci.yml`], which contains a bunch of steps that are
unified for all CI jobs that we execute. When a commit is pushed to a
corresponding branch or a PR, the workflow executes the
[`src/ci/github-actions/ci.py`] script, which dynamically generates the specific CI
[`src/ci/citool`] crate, which dynamically generates the specific CI
jobs that should be executed. This script uses the [`jobs.yml`] file as an
input, which contains a declarative configuration of all our CI jobs.

Expand Down Expand Up @@ -133,29 +133,37 @@ There are several use-cases for try builds:
Again, a working compiler build is needed for this, which can be produced by
the [dist-x86_64-linux] CI job.
- Run a specific CI job (e.g. Windows tests) on a PR, to quickly test if it
passes the test suite executed by that job. You can select which CI jobs will
be executed in the try build by adding up to 10 lines containing `try-job:
<name of job>` to the PR description. All such specified jobs will be executed
in the try build once the `@bors try` command is used on the PR. If no try
jobs are specified in this way, the jobs defined in the `try` section of
[`jobs.yml`] will be executed by default.
passes the test suite executed by that job.

You can select which CI jobs will
be executed in the try build by adding lines containing `try-job:
<job pattern>` to the PR description. All such specified jobs will be executed
in the try build once the `@bors try` command is used on the PR. If no try
jobs are specified in this way, the jobs defined in the `try` section of
[`jobs.yml`] will be executed by default.

Each pattern can either be an exact name of a job or a glob pattern that matches multiple jobs,
for example `*msvc*` or `*-alt`. You can start at most 20 jobs in a single try build. When using
glob patterns, you might want to wrap them in backticks (`` ` ``) to avoid GitHub rendering
the pattern as Markdown.

> **Using `try-job` PR description directives**
>
> 1. Identify which set of try-jobs (max 10) you would like to exercise. You can
> 1. Identify which set of try-jobs you would like to exercise. You can
> find the name of the CI jobs in [`jobs.yml`].
>
> 2. Amend PR description to include (usually at the end of the PR description)
> e.g.
> 2. Amend PR description to include a set of patterns (usually at the end
> of the PR description), for example:
>
> ```text
> This PR fixes #123456.
>
> try-job: x86_64-msvc
> try-job: test-various
> try-job: `*-alt`
> ```
>
> Each `try-job` directive must be on its own line.
> Each `try-job` pattern must be on its own line.
>
> 3. Run the prescribed try jobs with `@bors try`. As aforementioned, this
> requires the user to either (1) have `try` permissions or (2) be delegated
Expand Down Expand Up @@ -299,7 +307,7 @@ platform’s custom [Docker container]. This has a lot of advantages for us:
- We can avoid reinstalling tools (like QEMU or the Android emulator) every time
thanks to Docker image caching.
- Users can run the same tests in the same environment locally by just running
`python3 src/ci/github-actions/ci.py run-local <job-name>`, which is awesome to debug failures. Note that there are only linux docker images available locally due to licensing and
`cargo run --manifest-path src/ci/citool/Cargo.toml run-local <job-name>`, which is awesome to debug failures. Note that there are only linux docker images available locally due to licensing and
other restrictions.

The docker images prefixed with `dist-` are used for building artifacts while
Expand Down Expand Up @@ -443,7 +451,7 @@ this:
[GitHub Actions]: https://github.com/rust-lang/rust/actions
[`jobs.yml`]: https://github.com/rust-lang/rust/blob/master/src/ci/github-actions/jobs.yml
[`.github/workflows/ci.yml`]: https://github.com/rust-lang/rust/blob/master/.github/workflows/ci.yml
[`src/ci/github-actions/ci.py`]: https://github.com/rust-lang/rust/blob/master/src/ci/github-actions/ci.py
[`src/ci/citool`]: https://github.com/rust-lang/rust/blob/master/src/ci/citool
[rust-lang-ci]: https://github.com/rust-lang-ci/rust/actions
[bors]: https://github.com/bors
[homu]: https://github.com/rust-lang/homu
Expand Down
32 changes: 4 additions & 28 deletions src/tests/compiletest.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ The following test suites are available, with links for more information:

### General purpose test suite

[`run-make`](#run-make-tests) are general purpose tests using Rust programs (or
Makefiles (legacy)).
[`run-make`](#run-make-tests) are general purpose tests using Rust programs.

### Rustdoc test suites

Expand Down Expand Up @@ -396,14 +395,6 @@ your test, causing separate files to be generated for 32bit and 64bit systems.

### `run-make` tests

> **Note on phasing out `Makefile`s**
>
> We are planning to migrate all existing Makefile-based `run-make` tests
> to Rust programs. You should not be adding new Makefile-based `run-make`
> tests.
>
> See <https://github.com/rust-lang/rust/issues/121876>.

The tests in [`tests/run-make`] are general-purpose tests using Rust *recipes*,
which are small programs (`rmake.rs`) allowing arbitrary Rust code such as
`rustc` invocations, and is supported by a [`run_make_support`] library. Using
Expand All @@ -424,10 +415,9 @@ Compiletest directives like `//@ only-<target>` or `//@ ignore-<target>` are
supported in `rmake.rs`, like in UI tests. However, revisions or building
auxiliary via directives are not currently supported.

Two `run-make` tests are ported over to Rust recipes as examples:

- <https://github.com/rust-lang/rust/tree/master/tests/run-make/CURRENT_RUSTC_VERSION>
- <https://github.com/rust-lang/rust/tree/master/tests/run-make/a-b-a-linker-guard>
`rmake.rs` and `run-make-support` may *not* use any nightly/unstable features,
as they must be compilable by a stage 0 rustc that may be a beta or even stable
rustc.

#### Quickly check if `rmake.rs` tests can be compiled

Expand Down Expand Up @@ -481,20 +471,6 @@ Then add a corresponding entry to `"rust-analyzer.linkedProjects"`
],
```

#### Using Makefiles (legacy)

<div class="warning">
You should avoid writing new Makefile-based `run-make` tests.
</div>

Each test should be in a separate directory with a `Makefile` indicating the
commands to run.

There is a [`tools.mk`] Makefile which you can include which provides a bunch of
utilities to make it easier to run commands and compare outputs. Take a look at
some of the other tests for some examples on how to get started.

[`tools.mk`]: https://github.com/rust-lang/rust/blob/master/tests/run-make/tools.mk
[`tests/run-make`]: https://github.com/rust-lang/rust/tree/master/tests/run-make
[`run_make_support`]: https://github.com/rust-lang/rust/tree/master/src/tools/run-make-support

Expand Down
8 changes: 2 additions & 6 deletions src/tests/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
FIXME(jieyouxu) completely revise this chapter.
-->

Directives are special comments that tell compiletest how to build and interpret
a test. They must appear before the Rust source in the test. They may also
appear in `rmake.rs` or legacy Makefiles for [run-make
tests](compiletest.md#run-make-tests).
Directives are special comments that tell compiletest how to build and interpret a test. They must appear before the Rust source in the test. They may also appear in `rmake.rs` [run-make tests](compiletest.md#run-make-tests).

They are normally put after the short comment that explains the point of this
test. Compiletest test suites use `//@` to signal that a comment is a directive.
Expand Down Expand Up @@ -142,6 +139,7 @@ Some examples of `X` in `ignore-X` or `only-X`:
- Pointer width: `32bit`, `64bit`
- Endianness: `endian-big`
- Stage: `stage1`, `stage2`
- Binary format: `elf`
Comment on lines 141 to +142
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This merge conflicted due to stage0 being removed and binary format getting added next to it.

- Channel: `stable`, `beta`
- When cross compiling: `cross-compile`
- When [remote testing] is used: `remote`
Expand Down Expand Up @@ -220,8 +218,6 @@ The following directives will check LLVM support:
[`aarch64-gnu-debug`]), which only runs a
subset of `run-make` tests. Other tests with this directive will not
run at all, which is usually not what you want.
- Notably, the [`aarch64-gnu-debug`] CI job *currently* only runs `run-make`
tests which additionally contain `clang` in their test name.

See also [Debuginfo tests](compiletest.md#debuginfo-tests) for directives for
ignoring debuggers.
Expand Down
9 changes: 9 additions & 0 deletions src/tests/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ Some additional notes about using the interactive mode:
containers. With the container name, run `docker exec -it <CONTAINER>
/bin/bash` where `<CONTAINER>` is the container name like `4ba195e95cef`.

The approach described above is a relatively low-level interface for running the Docker images
directly. If you want to run a full CI Linux job locally with Docker, in a way that is as close to CI as possible, you can use the following command:

```bash
cargo run --manifest-path src/ci/citool/Cargo.toml run-local <job-name>
# For example:
cargo run --manifest-path src/ci/citool/Cargo.toml run-local dist-x86_64-linux-alt
```

[Docker]: https://www.docker.com/
[`src/ci/docker`]: https://github.com/rust-lang/rust/tree/master/src/ci/docker
[`src/ci/docker/run.sh`]: https://github.com/rust-lang/rust/blob/master/src/ci/docker/run.sh
Expand Down
25 changes: 0 additions & 25 deletions src/tests/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,30 +240,6 @@ This is much faster, but doesn't always work. For example, some tests include
directives that specify specific compiler flags, or which rely on other crates,
and they may not run the same without those options.

## Running `run-make` tests

### Windows

Running the `run-make` test suite on Windows is a currently bit more involved.
There are numerous prerequisites and environmental requirements:

- Install msys2: <https://www.msys2.org/>
- Specify `MSYS2_PATH_TYPE=inherit` in `msys2.ini` in the msys2 installation directory, run the
following with `MSYS2 MSYS`:
- `pacman -Syuu`
- `pacman -S make`
- `pacman -S diffutils`
- `pacman -S binutils`
- `./x test run-make` (`./x test tests/run-make` doesn't work)

There is [on-going work][port-run-make] to not rely on `Makefile`s in the
run-make test suite. Once this work is completed, you can run the entire
`run-make` test suite on native Windows inside `cmd` or `PowerShell` without
needing to install and use MSYS2. As of <!--date-check --> Oct 2024, it is
already possible to run the vast majority of the `run-make` test suite outside
of MSYS2, but there will be failures for the tests that still use `Makefile`s
due to not finding `make`.

## Running tests on a remote machine

Tests may be run on a remote machine (e.g. to test builds for a different
Expand Down Expand Up @@ -408,4 +384,3 @@ If you encounter bugs or problems, don't hesitate to open issues on the
repository](https://github.com/rust-lang/rustc_codegen_gcc/).

[`tests/ui`]: https://github.com/rust-lang/rust/tree/master/tests/ui
[port-run-make]: https://github.com/rust-lang/rust/issues/121876