Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
001c57d
Auto merge of #145480 - cjgillot:sizeless-chunks, r=Mark-Simulacrum
bors Aug 25, 2025
79e3a17
Rollup merge of #135761 - hkBst:patch-9, r=ibraheemdev
Zalathar Aug 25, 2025
3c1d147
Rollup merge of #145620 - compiler-errors:fake-dyn-to-dyn, r=lcnr
Zalathar Aug 25, 2025
93f5a6e
Rollup merge of #145788 - JonathanBrouwer:proper-fix-for-macro-call-t…
Zalathar Aug 25, 2025
6b9ba38
Rollup merge of #145794 - he32:bootstrap-netbsd-fix, r=Kobzol
Zalathar Aug 25, 2025
08b9649
Rollup merge of #145817 - Zalathar:llvm-bool, r=workingjubilee
Zalathar Aug 25, 2025
3e83cd6
Rollup merge of #145820 - mati865:raw-elf-verdefnum, r=bjorn3
Zalathar Aug 25, 2025
2f46f9d
Rollup merge of #145842 - tshepang:rdg-sync, r=jieyouxu
Zalathar Aug 25, 2025
74633c3
Auto merge of #145844 - Zalathar:rollup-4kdll9t, r=Zalathar
bors Aug 25, 2025
33c1775
Auto merge of #145472 - Kobzol:bootstrap-dist, r=jieyouxu
bors Aug 25, 2025
5b92259
Auto merge of #145711 - lcnr:non-defining-uses-hir-typeck, r=BoxyUwU
bors Aug 25, 2025
dc85fed
Auto merge of #145848 - Kobzol:optimize-file-read, r=the8472
bors Aug 26, 2025
08ac634
Auto merge of #144841 - cjgillot:typeck-no-attrs, r=davidtwco
bors Aug 27, 2025
0ecd5b5
Auto merge of #140737 - amandasystems:revised-constraint-search, r=lcnr
bors Aug 27, 2025
02b0583
Auto merge of #145851 - lolbinarycat:rustdoc-optimize, r=GuillaumeGomez
bors Aug 27, 2025
ea6dcc7
Auto merge of #145807 - zachs18:only-consider-auto-traits-empty, r=co…
bors Aug 28, 2025
0875ad9
Auto merge of #145377 - ChayimFriedman2:solver-def-id, r=lcnr
bors Aug 29, 2025
5dabf27
Auto merge of #144494 - scottmcm:min_bigint_helpers, r=Mark-Simulacrum
bors Aug 30, 2025
7a6d7c1
Auto merge of #145479 - Kmeakin:km/hardcode-char-is-control, r=joboet
bors Aug 30, 2025
e6014bf
Auto merge of #145582 - estebank:issue-107806, r=chenyukang
bors Aug 31, 2025
a8a222d
Auto merge of #143290 - azhogin:azhogin/link-pub-async-impls, r=oli-obk
bors Sep 1, 2025
a013b4d
Auto merge of #144783 - folkertdev:loop-match-diverging-loop, r=Sparr…
bors Sep 1, 2025
a2c5a96
Rename `ToolRustc` to `ToolRustcPrivate`
Kobzol Sep 2, 2025
da24fca
Rollup merge of #140459 - niklasf:feature/read-buf-at, r=tgross35
Zalathar Sep 4, 2025
b34c5bb
Rollup merge of #143725 - kennytm:peekable_next_if_map, r=jhpratt
Zalathar Sep 4, 2025
4f84858
Rollup merge of #145209 - hanna-kruppe:path_add_extension, r=tgross35
Zalathar Sep 4, 2025
7b0c6ef
Rollup merge of #145342 - dianne:if-let-super-let, r=nnethercote
Zalathar Sep 4, 2025
b6b0ecb
Rollup merge of #145750 - btj:drop-alloc-guard, r=tgross35
Zalathar Sep 4, 2025
a49b4dd
Rollup merge of #145827 - estebank:issue-51976, r=jackh726
Zalathar Sep 4, 2025
b5877ab
Rollup merge of #146127 - Kobzol:rename-tool-rustc, r=jieyouxu
Zalathar Sep 4, 2025
d13d2d3
Rollup merge of #146131 - notriddle:rustdoc-search-load-itemtype-test…
Zalathar Sep 4, 2025
b8b9f6a
Rollup merge of #146134 - maurer:nvptx-sync, r=durin42
Zalathar Sep 4, 2025
90bb4c7
Rollup merge of #146136 - AudaciousAxiom:docs/missing-closing-code-bl…
Zalathar Sep 4, 2025
c35517c
Rollup merge of #146137 - Urgau:cfg-disallow-frontmatter, r=fmease
Zalathar Sep 4, 2025
bb623e2
Rollup merge of #146140 - jeremyd2019:patch-1, r=jieyouxu
Zalathar Sep 4, 2025
546bf30
Rollup merge of #146150 - weihanglo:rustdoc-emit, r=aDotInTheVoid
Zalathar Sep 4, 2025
d0ab2ac
Rollup merge of #146155 - Shourya742:2025-09-03-make-test-run-paralle…
Zalathar Sep 4, 2025
3c8120a
Rollup merge of #146161 - GuillaumeGomez:loaded-paths-scraped-example…
Zalathar Sep 4, 2025
b0569c8
Rollup merge of #146172 - RalfJung:triagebot-keyword-mentions, r=Urgau
Zalathar Sep 4, 2025
3d5fcdc
Auto merge of #146185 - Zalathar:rollup-n14lyv6, r=Zalathar
bors Sep 4, 2025
d51dd1c
Auto merge of #146176 - weihanglo:update-cargo, r=weihanglo
bors Sep 4, 2025
d16eda2
Auto merge of #145911 - notriddle:stringdex-tweak-3, r=GuillaumeGomez
bors Sep 4, 2025
aa4b0e5
Auto merge of #138736 - azhogin:azhogin/sanitizers-target-modificator…
bors Sep 4, 2025
df6fd01
Auto merge of #144737 - petrochenkov:extprelcache, r=davidtwco
bors Sep 5, 2025
abc08e7
Auto merge of #146044 - estebank:issue-88727, r=chenyukang
bors Sep 5, 2025
e85319f
rustc-dev-guide: update docs for `run-make-cargo`
jieyouxu Sep 5, 2025
1a9f1c2
Auto merge of #146233 - jieyouxu:run-make-fission, r=Kobzol
bors Sep 6, 2025
0639d5f
Rollup merge of #139524 - Berrysoft:cygwin-socket-ext, r=tgross35
tgross35 Sep 6, 2025
c5768a1
Rollup merge of #145940 - pascaldekloe:int-exp-tune, r=tgross35
tgross35 Sep 6, 2025
99edef7
Auto merge of #146282 - tgross35:rollup-0n5tjnm, r=tgross35
bors Sep 6, 2025
2e093be
Auto merge of #146271 - niacdoial:improperctypes-refactor1, r=tgross35
bors Sep 7, 2025
bfe607d
Auto merge of #146216 - LorrensP-2158466:miri-float-nondet-foreign-it…
bors Sep 7, 2025
b64e160
Auto merge of #146289 - cjgillot:gvn-aggregate, r=dianqk
bors Sep 7, 2025
b24d9a3
Auto merge of #146148 - Flakebi:global-addrspace-test, r=Mark-Simulacrum
bors Sep 7, 2025
82a5eaf
Auto merge of #145541 - cjgillot:dest-prop-live-range, r=Amanieu
bors Sep 7, 2025
cacadcb
Prepare for merging from rust-lang/rust
invalid-email-address Sep 8, 2025
eefc967
Merge ref '2f3f27bf79ec' from rust-lang/rust
invalid-email-address Sep 8, 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 @@
a1dbb443527bd126452875eb5d5860c1d001d761
2f3f27bf79ec147fec9d2e7980605307a74067f4
7 changes: 2 additions & 5 deletions src/building/bootstrapping/writing-tools-in-bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ There are three types of tools you can write in bootstrap:
Use this for tools that rely on the locally built std. The output goes into the "stageN-tools" directory.
This mode is rarely used, mainly for `compiletest` which requires `libtest`.

- **`Mode::ToolRustc`**
Use this for tools that depend on both the locally built `rustc` and the target `std`. This is more complex than
the other modes because the tool must be built with the same compiler used for `rustc` and placed in the "stageN-tools"
directory. When you choose `Mode::ToolRustc`, `ToolBuild` implementation takes care of this automatically.
If you need to use the builder’s compiler for something specific, you can get it from `ToolBuildResult`, which is
- **`Mode::ToolRustcPrivate`**
Use this for tools that use the `rustc_private` mechanism, and thus depend on the locally built `rustc` and its rlib artifacts. This is more complex than the other modes because the tool must be built with the same compiler used for `rustc` and placed in the "stageN-tools" directory. When you choose `Mode::ToolRustcPrivate`, `ToolBuild` implementation takes care of this automatically. If you need to use the builder’s compiler for something specific, you can get it from `ToolBuildResult`, which is
returned by the tool's [`Step`].

Regardless of the tool type you must return `ToolBuildResult` from the tool’s [`Step`] implementation and use `ToolBuild` inside it.
Expand Down
2 changes: 2 additions & 0 deletions src/tests/adding.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ guidelines:
suites.
- Need to inspect the resulting binary in some way? Or if all the other test
suites are too limited for your purposes? Then use `run-make`.
- Use `run-make-cargo` if you need to exercise in-tree `cargo` in conjunction
with in-tree `rustc`.
- Check out the [compiletest] chapter for more specialized test suites.

After deciding on which kind of test to add, see [best
Expand Down
8 changes: 4 additions & 4 deletions src/tests/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ related tests.
- E.g. for an implementation of RFC 2093 specifically, we can group a
collection of tests under `tests/ui/rfc-2093-infer-outlives/`. For the
directory name, include what the RFC is about.
- For the [`run-make`] test suite, each `rmake.rs` must be contained within an
immediate subdirectory under `tests/run-make/`. Further nesting is not
presently supported. Avoid including issue number in the directory name too,
include that info in a comment inside `rmake.rs`.
- For the [`run-make`]/`run-make-support` test suites, each `rmake.rs` must
be contained within an immediate subdirectory under `tests/run-make/` or
`tests/run-make-cargo/` respectively. Further nesting is not presently
supported. Avoid using _only_ an issue number for the test name as well.

## Test descriptions

Expand Down
15 changes: 11 additions & 4 deletions src/tests/compiletest.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,19 @@ your test, causing separate files to be generated for 32bit and 64bit systems.

### `run-make` tests

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
Rust recipes provide the ultimate in flexibility.
The tests in [`tests/run-make`] and [`tests/run-make-cargo`] 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 Rust recipes provide the ultimate in
flexibility.

`run-make` tests should be used if no other test suites better suit your needs.

The `run-make-cargo` test suite additionally builds an in-tree `cargo` to support
use cases that require testing in-tree `cargo` in conjunction with in-tree `rustc`.
The `run-make` test suite does not have access to in-tree `cargo` (so it can be the
faster-to-iterate test suite).

#### Using Rust recipes

Each test should be in a separate directory with a `rmake.rs` Rust program,
Expand Down Expand Up @@ -476,6 +482,7 @@ Then add a corresponding entry to `"rust-analyzer.linkedProjects"`
```

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

### Coverage tests
Expand Down
40 changes: 20 additions & 20 deletions src/tests/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ not be exhaustive. Directives can generally be found by browsing the

See [Building auxiliary crates](compiletest.html#building-auxiliary-crates)

| Directive | Explanation | Supported test suites | Possible values |
|-----------------------|-------------------------------------------------------------------------------------------------------|-----------------------|-----------------------------------------------|
| `aux-bin` | Build a aux binary, made available in `auxiliary/bin` relative to test directory | All except `run-make` | Path to auxiliary `.rs` file |
| `aux-build` | Build a separate crate from the named source file | All except `run-make` | Path to auxiliary `.rs` file |
| `aux-crate` | Like `aux-build` but makes available as extern prelude | All except `run-make` | `<extern_prelude_name>=<path/to/aux/file.rs>` |
| `aux-codegen-backend` | Similar to `aux-build` but pass the compiled dylib to `-Zcodegen-backend` when building the main file | `ui-fulldeps` | Path to codegen backend file |
| `proc-macro` | Similar to `aux-build`, but for aux forces host and don't use `-Cprefer-dynamic`[^pm]. | All except `run-make` | Path to auxiliary proc-macro `.rs` file |
| `build-aux-docs` | Build docs for auxiliaries as well. Note that this only works with `aux-build`, not `aux-crate`. | All except `run-make` | N/A |
| Directive | Explanation | Supported test suites | Possible values |
|-----------------------|-------------------------------------------------------------------------------------------------------|----------------------------------------|-----------------------------------------------|
| `aux-bin` | Build a aux binary, made available in `auxiliary/bin` relative to test directory | All except `run-make`/`run-make-cargo` | Path to auxiliary `.rs` file |
| `aux-build` | Build a separate crate from the named source file | All except `run-make`/`run-make-cargo` | Path to auxiliary `.rs` file |
| `aux-crate` | Like `aux-build` but makes available as extern prelude | All except `run-make`/`run-make-cargo` | `<extern_prelude_name>=<path/to/aux/file.rs>` |
| `aux-codegen-backend` | Similar to `aux-build` but pass the compiled dylib to `-Zcodegen-backend` when building the main file | `ui-fulldeps` | Path to codegen backend file |
| `proc-macro` | Similar to `aux-build`, but for aux forces host and don't use `-Cprefer-dynamic`[^pm]. | All except `run-make`/`run-make-cargo` | Path to auxiliary proc-macro `.rs` file |
| `build-aux-docs` | Build docs for auxiliaries as well. Note that this only works with `aux-build`, not `aux-crate`. | All except `run-make`/`run-make-cargo` | N/A |

[^pm]: please see the [Auxiliary proc-macro section](compiletest.html#auxiliary-proc-macro) in the compiletest chapter for specifics.

Expand Down Expand Up @@ -243,18 +243,18 @@ ignoring debuggers.

### Affecting how tests are built

| Directive | Explanation | Supported test suites | Possible values |
|---------------------|----------------------------------------------------------------------------------------------|---------------------------|--------------------------------------------------------------------------------------------|
| `compile-flags` | Flags passed to `rustc` when building the test or aux file | All except for `run-make` | Any valid `rustc` flags, e.g. `-Awarnings -Dfoo`. Cannot be `-Cincremental` or `--edition` |
| `edition` | The edition used to build the test | All except for `run-make` | Any valid `--edition` value |
| `rustc-env` | Env var to set when running `rustc` | All except for `run-make` | `<KEY>=<VALUE>` |
| `unset-rustc-env` | Env var to unset when running `rustc` | All except for `run-make` | Any env var name |
| `incremental` | Proper incremental support for tests outside of incremental test suite | `ui`, `crashes` | N/A |
| `no-prefer-dynamic` | Don't use `-C prefer-dynamic`, don't build as a dylib via a `--crate-type=dylib` preset flag | `ui`, `crashes` | N/A |
| Directive | Explanation | Supported test suites | Possible values |
|---------------------|----------------------------------------------------------------------------------------------|--------------------------------------------|--------------------------------------------------------------------------------------------|
| `compile-flags` | Flags passed to `rustc` when building the test or aux file | All except for `run-make`/`run-make-cargo` | Any valid `rustc` flags, e.g. `-Awarnings -Dfoo`. Cannot be `-Cincremental` or `--edition` |
| `edition` | The edition used to build the test | All except for `run-make`/`run-make-cargo` | Any valid `--edition` value |
| `rustc-env` | Env var to set when running `rustc` | All except for `run-make`/`run-make-cargo` | `<KEY>=<VALUE>` |
| `unset-rustc-env` | Env var to unset when running `rustc` | All except for `run-make`/`run-make-cargo` | Any env var name |
| `incremental` | Proper incremental support for tests outside of incremental test suite | `ui`, `crashes` | N/A |
| `no-prefer-dynamic` | Don't use `-C prefer-dynamic`, don't build as a dylib via a `--crate-type=dylib` preset flag | `ui`, `crashes` | N/A |

<div class="warning">

Tests (outside of `run-make`) that want to use incremental tests not in the
Tests (outside of `run-make`/`run-make-cargo`) that want to use incremental tests not in the
incremental test-suite must not pass `-C incremental` via `compile-flags`, and
must instead use the `//@ incremental` directive.

Expand All @@ -264,9 +264,9 @@ Consider writing the test as a proper incremental test instead.

### Rustdoc

| Directive | Explanation | Supported test suites | Possible values |
|-------------|--------------------------------------------------------------|------------------------------------------|---------------------------|
| `doc-flags` | Flags passed to `rustdoc` when building the test or aux file | `rustdoc`, `rustdoc-js`, `rustdoc-json` | Any valid `rustdoc` flags |
| Directive | Explanation | Supported test suites | Possible values |
|-------------|--------------------------------------------------------------|-----------------------------------------|---------------------------|
| `doc-flags` | Flags passed to `rustdoc` when building the test or aux file | `rustdoc`, `rustdoc-js`, `rustdoc-json` | Any valid `rustdoc` flags |

<!--
**FIXME(rustdoc)**: what does `check-test-line-numbers-match` do?
Expand Down
4 changes: 2 additions & 2 deletions src/tests/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ In `ui` tests and other test suites that support `//@ rustc-env`, you can specif
//@ rustc-env:RUSTC_BOOTSTRAP=-1
```

For `run-make` tests, `//@ rustc-env` is not supported. You can do something
like the following for individual `rustc` invocations.
For `run-make`/`run-make-cargo` tests, `//@ rustc-env` is not supported. You can do
something like the following for individual `rustc` invocations.

```rust,ignore
use run_make_support::rustc;
Expand Down