Merge pull request #2584 from rust-lang/tshepang-patch-5
remove confusing parts of sentence
diff --git a/rust-version b/rust-version
index f412399..df2bac8 100644
--- a/rust-version
+++ b/rust-version
@@ -1 +1 @@
-a1dbb443527bd126452875eb5d5860c1d001d761
+2f3f27bf79ec147fec9d2e7980605307a74067f4
diff --git a/src/SUMMARY.md b/src/SUMMARY.md
index a161273..2491409 100644
--- a/src/SUMMARY.md
+++ b/src/SUMMARY.md
@@ -108,6 +108,7 @@
- [Installation](./autodiff/installation.md)
- [How to debug](./autodiff/debugging.md)
- [Autodiff flags](./autodiff/flags.md)
+ - [Type Trees](./autodiff/type-trees.md)
# Source Code Representation
diff --git a/src/appendix/glossary.md b/src/appendix/glossary.md
index 1837b59..21162f8 100644
--- a/src/appendix/glossary.md
+++ b/src/appendix/glossary.md
@@ -68,6 +68,7 @@
<span id="rib">rib</span> | A data structure in the name resolver that keeps track of a single scope for names. ([see more](../name-resolution.md))
<span id="rpit">RPIT</span> | A return-position `impl Trait`. ([see the reference](https://doc.rust-lang.org/reference/types/impl-trait.html#abstract-return-types)).
<span id="rpitit">RPITIT</span> | A return-position `impl Trait` in trait. Unlike RPIT, this is desugared to a generic associated type (GAT). Introduced in [RFC 3425](https://rust-lang.github.io/rfcs/3425-return-position-impl-trait-in-traits.html). ([see more](../return-position-impl-trait-in-trait.md))
+<span id="rustbuild">rustbuild</span> | A deprecated term for the part of bootstrap that is written in Rust
<span id="scrutinee">scrutinee</span> | A scrutinee is the expression that is matched on in `match` expressions and similar pattern matching constructs. For example, in `match x { A => 1, B => 2 }`, the expression `x` is the scrutinee.
<span id="sess">`sess`</span> | The compiler _session_, which stores global data used throughout compilation
<span id="side-tables">side tables</span> | Because the [AST](#ast) and HIR are immutable once created, we often carry extra information about them in the form of hashtables, indexed by the id of a particular node.
diff --git a/src/autodiff/type-trees.md b/src/autodiff/type-trees.md
new file mode 100644
index 0000000..68cb786
--- /dev/null
+++ b/src/autodiff/type-trees.md
@@ -0,0 +1,193 @@
+# TypeTrees for Autodiff
+
+## What are TypeTrees?
+Memory layout descriptors for Enzyme. Tell Enzyme exactly how types are structured in memory so it can compute derivatives efficiently.
+
+## Structure
+```rust
+TypeTree(Vec<Type>)
+
+Type {
+ offset: isize, // byte offset (-1 = everywhere)
+ size: usize, // size in bytes
+ kind: Kind, // Float, Integer, Pointer, etc.
+ child: TypeTree // nested structure
+}
+```
+
+## Example: `fn compute(x: &f32, data: &[f32]) -> f32`
+
+**Input 0: `x: &f32`**
+```rust
+TypeTree(vec![Type {
+ offset: -1, size: 8, kind: Pointer,
+ child: TypeTree(vec![Type {
+ offset: 0, size: 4, kind: Float, // Single value: use offset 0
+ child: TypeTree::new()
+ }])
+}])
+```
+
+**Input 1: `data: &[f32]`**
+```rust
+TypeTree(vec![Type {
+ offset: -1, size: 8, kind: Pointer,
+ child: TypeTree(vec![Type {
+ offset: -1, size: 4, kind: Float, // -1 = all elements
+ child: TypeTree::new()
+ }])
+}])
+```
+
+**Output: `f32`**
+```rust
+TypeTree(vec![Type {
+ offset: 0, size: 4, kind: Float, // Single scalar: use offset 0
+ child: TypeTree::new()
+}])
+```
+
+## Why Needed?
+- Enzyme can't deduce complex type layouts from LLVM IR
+- Prevents slow memory pattern analysis
+- Enables correct derivative computation for nested structures
+- Tells Enzyme which bytes are differentiable vs metadata
+
+## What Enzyme Does With This Information:
+
+Without TypeTrees:
+```llvm
+; Enzyme sees generic LLVM IR:
+define float @distance(ptr %p1, ptr %p2) {
+; Has to guess what these pointers point to
+; Slow analysis of all memory operations
+; May miss optimization opportunities
+}
+```
+
+With TypeTrees:
+```llvm
+define "enzyme_type"="{[-1]:Float@float}" float @distance(
+ ptr "enzyme_type"="{[-1]:Pointer, [-1,0]:Float@float}" %p1,
+ ptr "enzyme_type"="{[-1]:Pointer, [-1,0]:Float@float}" %p2
+) {
+; Enzyme knows exact type layout
+; Can generate efficient derivative code directly
+}
+```
+
+# TypeTrees - Offset and -1 Explained
+
+## Type Structure
+
+```rust
+Type {
+ offset: isize, // WHERE this type starts
+ size: usize, // HOW BIG this type is
+ kind: Kind, // WHAT KIND of data (Float, Int, Pointer)
+ child: TypeTree // WHAT'S INSIDE (for pointers/containers)
+}
+```
+
+## Offset Values
+
+### Regular Offset (0, 4, 8, etc.)
+**Specific byte position within a structure**
+
+```rust
+struct Point {
+ x: f32, // offset 0, size 4
+ y: f32, // offset 4, size 4
+ id: i32, // offset 8, size 4
+}
+```
+
+TypeTree for `&Point` (internal representation):
+```rust
+TypeTree(vec![
+ Type { offset: 0, size: 4, kind: Float }, // x at byte 0
+ Type { offset: 4, size: 4, kind: Float }, // y at byte 4
+ Type { offset: 8, size: 4, kind: Integer } // id at byte 8
+])
+```
+
+Generates LLVM
+```llvm
+"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@float, [-1,4]:Float@float, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer}"
+```
+
+### Offset -1 (Special: "Everywhere")
+**Means "this pattern repeats for ALL elements"**
+
+#### Example 1: Direct Array `[f32; 100]` (no pointer indirection)
+```rust
+TypeTree(vec![Type {
+ offset: -1, // ALL positions
+ size: 4, // each f32 is 4 bytes
+ kind: Float, // every element is float
+}])
+```
+
+Generates LLVM: `"enzyme_type"="{[-1]:Float@float}"`
+
+#### Example 1b: Array Reference `&[f32; 100]` (with pointer indirection)
+```rust
+TypeTree(vec![Type {
+ offset: -1, size: 8, kind: Pointer,
+ child: TypeTree(vec![Type {
+ offset: -1, // ALL array elements
+ size: 4, // each f32 is 4 bytes
+ kind: Float, // every element is float
+ }])
+}])
+```
+
+Generates LLVM: `"enzyme_type"="{[-1]:Pointer, [-1,-1]:Float@float}"`
+
+Instead of listing 100 separate Types with offsets `0,4,8,12...396`
+
+#### Example 2: Slice `&[i32]`
+```rust
+// Pointer to slice data
+TypeTree(vec![Type {
+ offset: -1, size: 8, kind: Pointer,
+ child: TypeTree(vec![Type {
+ offset: -1, // ALL slice elements
+ size: 4, // each i32 is 4 bytes
+ kind: Integer
+ }])
+}])
+```
+
+Generates LLVM: `"enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}"`
+
+#### Example 3: Mixed Structure
+```rust
+struct Container {
+ header: i64, // offset 0
+ data: [f32; 1000], // offset 8, but elements use -1
+}
+```
+
+```rust
+TypeTree(vec![
+ Type { offset: 0, size: 8, kind: Integer }, // header
+ Type { offset: 8, size: 4000, kind: Pointer,
+ child: TypeTree(vec![Type {
+ offset: -1, size: 4, kind: Float // ALL array elements
+ }])
+ }
+])
+```
+
+## Key Distinction: Single Values vs Arrays
+
+**Single Values** use offset `0` for precision:
+- `&f32` has exactly one f32 value at offset 0
+- More precise than using -1 ("everywhere")
+- Generates: `{[-1]:Pointer, [-1,0]:Float@float}`
+
+**Arrays** use offset `-1` for efficiency:
+- `&[f32; 100]` has the same pattern repeated 100 times
+- Using -1 avoids listing 100 separate offsets
+- Generates: `{[-1]:Pointer, [-1,-1]:Float@float}`
\ No newline at end of file
diff --git a/src/building/bootstrapping/writing-tools-in-bootstrap.md b/src/building/bootstrapping/writing-tools-in-bootstrap.md
index 41d0cf8..8250a6f 100644
--- a/src/building/bootstrapping/writing-tools-in-bootstrap.md
+++ b/src/building/bootstrapping/writing-tools-in-bootstrap.md
@@ -3,20 +3,26 @@
There are three types of tools you can write in bootstrap:
- **`Mode::ToolBootstrap`**
+
Use this for tools that don’t need anything from the in-tree compiler and can run with the stage0 `rustc`.
- The output is placed in the "bootstrap-tools" directory. This mode is for general-purpose tools built
- entirely with the stage0 compiler, including target libraries and only works for stage 0.
+ The output is placed in the "bootstrap-tools" directory.
+ This mode is for general-purpose tools built entirely with the stage0 compiler,
+ including target libraries, and it only works for stage 0.
- **`Mode::ToolStd`**
- Use this for tools that rely on the locally built std. The output goes into the "stageN-tools" directory.
+
+ 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
- returned by the tool's [`Step`].
+- **`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.
diff --git a/src/building/how-to-build-and-run.md b/src/building/how-to-build-and-run.md
index b07d353..36610f2 100644
--- a/src/building/how-to-build-and-run.md
+++ b/src/building/how-to-build-and-run.md
@@ -149,7 +149,7 @@
```
PS C:\Users\vboxuser\rust> ./x
./x : File C:\Users\vboxuser\rust\x.ps1 cannot be loaded because running scripts is disabled on this system. For more
-information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
+information, see about_Execution_Policies at https://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ ./x
+ ~~~
diff --git a/src/contributing.md b/src/contributing.md
index 347608d..3d196ae 100644
--- a/src/contributing.md
+++ b/src/contributing.md
@@ -374,8 +374,10 @@
`rustdoc src/doc/reference.md` will render reference to `doc/reference.html`.
The CSS might be messed up, but you can verify that the HTML is right.
-Please notice that at this time we don't accept typography/spellcheck fixes to **internal documentation** (example:
-tests, library or compiler code) as it's usually not worth the churn or the review time.
+Please notice that we don't accept typography/spellcheck fixes to **internal documentation**
+as it's usually not worth the churn or the review time.
+Examples of internal documentation is code comments and rustc api docs.
+However, feel free to fix those if accompanied by other improvements in the same PR.
### Contributing to rustc-dev-guide
diff --git a/src/fuzzing.md b/src/fuzzing.md
index 3000537..cc98b49 100644
--- a/src/fuzzing.md
+++ b/src/fuzzing.md
@@ -90,14 +90,15 @@
triggering the ICE, such as syntax errors or borrow-checking errors
- Minimize the test case (see below). If successful, you can label the
issue with `S-has-mcve`. Otherwise, you can apply `E-needs-mcve`.
-- Add the minimal test case to the rust-lang/rust repo as a [crashes test].
+- Add the minimal test case to the rust-lang/rust repo as a [crash test].
While you're at it, consider including other "untracked" crashes in your PR.
- Please don't forget to mark your issue with `S-bug-has-test` afterwards.
+ Please don't forget to mark all relevant issues with `S-bug-has-test` once
+ your PR is merged.
See also [applying and removing labels][labeling].
[bisect]: https://rust-lang.github.io/cargo-bisect-rustc/
-[crashes test]: tests/compiletest.html#crashes-tests
+[crash test]: tests/compiletest.html#crash-tests
[labeling]: https://forge.rust-lang.org/release/issue-triaging.html#applying-and-removing-labels
## Minimization
diff --git a/src/tests/adding.md b/src/tests/adding.md
index e5c26be..46b8a1e 100644
--- a/src/tests/adding.md
+++ b/src/tests/adding.md
@@ -29,6 +29,8 @@
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
diff --git a/src/tests/best-practices.md b/src/tests/best-practices.md
index be00207..10372c3 100644
--- a/src/tests/best-practices.md
+++ b/src/tests/best-practices.md
@@ -71,7 +71,7 @@
> //! Regression test for <https://github.com/rust-lang/rust/issues/123456>.
> ```
>
-> One exception to this rule is [crashes tests]: there it is canonical that
+> One exception to this rule is [crash tests]: there it is canonical that
> tests are named only after issue numbers because its purpose is to track
> snippets from which issues no longer ICE/crash, and they would either be
> removed or converted into proper ui/other tests in the fix PRs.
@@ -83,10 +83,10 @@
- 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
@@ -199,4 +199,4 @@
[compiletest directives]: ./directives.md
[`run-make`]: ./compiletest.md#run-make-tests
[FileCheck]: https://llvm.org/docs/CommandGuide/FileCheck.html
-[crashes tests]: ./compiletest.md#crashes-tests
+[crash tests]: ./compiletest.md#crash-tests
diff --git a/src/tests/compiletest.md b/src/tests/compiletest.md
index 4980ed8..0234b39 100644
--- a/src/tests/compiletest.md
+++ b/src/tests/compiletest.md
@@ -72,7 +72,7 @@
| [`mir-opt`](#mir-opt-tests) | Check MIR generation and optimizations |
| [`coverage`](#coverage-tests) | Check coverage instrumentation |
| [`coverage-run-rustdoc`](#coverage-tests) | `coverage` tests that also run instrumented doctests |
-| [`crashes`](#crashes-tests) | Check that the compiler ICEs/panics/crashes on certain inputs to catch accidental fixes |
+| [`crashes`](#crash-tests) | Check that the compiler ICEs/panics/crashes on certain inputs to catch accidental fixes |
### General purpose test suite
@@ -397,13 +397,19 @@
### `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,
@@ -476,6 +482,7 @@
```
[`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
@@ -550,7 +557,7 @@
[`src/tools/coverage-dump`]: https://github.com/rust-lang/rust/tree/master/src/tools/coverage-dump
[`tests/coverage-run-rustdoc`]: https://github.com/rust-lang/rust/tree/master/tests/coverage-run-rustdoc
-### Crashes tests
+### Crash tests
[`tests/crashes`] serve as a collection of tests that are expected to cause the
compiler to ICE, panic or crash in some other way, so that accidental fixes are
@@ -573,13 +580,13 @@
When you do so, each issue number should be noted in the file name (`12345.rs`
should suffice) and also inside the file by means of a `//@ known-bug: #12345`
directive. Please [label][labeling] the relevant issues with `S-bug-has-test`
-afterwards.
+once your PR is merged.
If you happen to fix one of the crashes, please move it to a fitting
subdirectory in `tests/ui` and give it a meaningful name. Please add a doc
comment at the top of the file explaining why this test exists, even better if
you can briefly explain how the example causes rustc to crash previously and
-what was done to prevent rustc to ICE/panic/crash.
+what was done to prevent rustc to ICE / panic / crash.
Adding
diff --git a/src/tests/directives.md b/src/tests/directives.md
index f58ee66..4be78fa 100644
--- a/src/tests/directives.md
+++ b/src/tests/directives.md
@@ -52,14 +52,14 @@
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.
@@ -243,18 +243,18 @@
### 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.
@@ -264,9 +264,9 @@
### 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?
diff --git a/src/tests/misc.md b/src/tests/misc.md
index 39f8817..cc8f501 100644
--- a/src/tests/misc.md
+++ b/src/tests/misc.md
@@ -24,8 +24,8 @@
//@ 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;