Skip to content

rustc-dev-guide subtree update #142228

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 17 commits into from
Jun 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 src/doc/rustc-dev-guide/rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c68032fd4c442d275f4daa571ba19c076106b490
c31cccb7b5cc098b1a8c1794ed38d7fdbec0ccb0
4 changes: 2 additions & 2 deletions src/doc/rustc-dev-guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,8 @@
- [Notification groups](notification-groups/about.md)
- [Apple](notification-groups/apple.md)
- [ARM](notification-groups/arm.md)
- [Cleanup Crew](notification-groups/cleanup-crew.md)
- [Emscripten](notification-groups/emscripten.md)
- [Fuchsia](notification-groups/fuchsia.md)
- [LLVM](notification-groups/llvm.md)
- [RISC-V](notification-groups/risc-v.md)
- [Rust for Linux](notification-groups/rust-for-linux.md)
- [WASI](notification-groups/wasi.md)
Expand Down Expand Up @@ -101,6 +99,8 @@
- [Rustdoc internals](./rustdoc-internals.md)
- [Search](./rustdoc-internals/search.md)
- [The `rustdoc` test suite](./rustdoc-internals/rustdoc-test-suite.md)
- [The `rustdoc-gui` test suite](./rustdoc-internals/rustdoc-gui-test-suite.md)
- [The `rustdoc-json` test suite](./rustdoc-internals/rustdoc-json-test-suite.md)
- [Autodiff internals](./autodiff/internals.md)
- [Installation](./autodiff/installation.md)
- [How to debug](./autodiff/debugging.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Bootstrap will conditionally build `tracing` support and enable `tracing` output

Example basic usage[^just-trace]:

[^just-trace]: It is not recommend to use *just* `BOOTSTRAP_TRACING=TRACE` because that will dump *everything* at `TRACE` level, including logs intentionally gated behind custom targets as they are too verbose even for `TRACE` level by default.
[^just-trace]: It is not recommended to use *just* `BOOTSTRAP_TRACING=TRACE` because that will dump *everything* at `TRACE` level, including logs intentionally gated behind custom targets as they are too verbose even for `TRACE` level by default.

```bash
$ BOOTSTRAP_TRACING=bootstrap=TRACE ./x build library --stage 1
Expand Down
4 changes: 0 additions & 4 deletions src/doc/rustc-dev-guide/src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@ feel comfortable jumping straight into the large `rust-lang/rust` codebase.
The following tasks are doable without much background knowledge but are
incredibly helpful:

- [Cleanup crew][iceb]: find minimal reproductions of ICEs, bisect
regressions, etc. This is a way of helping that saves a ton of time for
others to fix an error later.
- [Writing documentation][wd]: if you are feeling a bit more intrepid, you could try
to read a part of the code and write doc comments for it. This will help you
to learn some part of the compiler while also producing a useful artifact!
Expand All @@ -179,7 +176,6 @@ incredibly helpful:
[users]: https://users.rust-lang.org/
[so]: http://stackoverflow.com/questions/tagged/rust
[community-library]: https://github.com/rust-lang/rfcs/labels/A-community-library
[iceb]: ./notification-groups/cleanup-crew.md
[wd]: ./contributing.md#writing-documentation
[wg]: https://rust-lang.github.io/compiler-team/working-groups/
[triage]: ./contributing.md#issue-triage
Expand Down
14 changes: 4 additions & 10 deletions src/doc/rustc-dev-guide/src/notification-groups/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ search for existing issues that haven't been claimed yet.
Here's the list of the notification groups:
- [Apple](./apple.md)
- [ARM](./arm.md)
- [Cleanup Crew](./cleanup-crew.md)
- [Emscripten](./emscripten.md)
- [LLVM Icebreakers](./llvm.md)
- [RISC-V](./risc-v.md)
- [WASI](./wasi.md)
- [WebAssembly](./wasm.md)
Expand Down Expand Up @@ -64,9 +62,7 @@ Example PRs:

* [Example of adding yourself to the Apple group.](https://github.com/rust-lang/team/pull/1434)
* [Example of adding yourself to the ARM group.](https://github.com/rust-lang/team/pull/358)
* [Example of adding yourself to the Cleanup Crew.](https://github.com/rust-lang/team/pull/221)
* [Example of adding yourself to the Emscripten group.](https://github.com/rust-lang/team/pull/1579)
* [Example of adding yourself to the LLVM group.](https://github.com/rust-lang/team/pull/140)
* [Example of adding yourself to the RISC-V group.](https://github.com/rust-lang/team/pull/394)
* [Example of adding yourself to the WASI group.](https://github.com/rust-lang/team/pull/1580)
* [Example of adding yourself to the WebAssembly group.](https://github.com/rust-lang/team/pull/1581)
Expand All @@ -81,9 +77,7 @@ group. For example:
```text
@rustbot ping apple
@rustbot ping arm
@rustbot ping cleanup-crew
@rustbot ping emscripten
@rustbot ping icebreakers-llvm
@rustbot ping risc-v
@rustbot ping wasi
@rustbot ping wasm
Expand All @@ -92,12 +86,12 @@ group. For example:

To make some commands shorter and easier to remember, there are aliases,
defined in the [`triagebot.toml`] file. For example, all of these commands
are equivalent and will ping the Cleanup Crew:
are equivalent and will ping the Apple group:

```text
@rustbot ping cleanup
@rustbot ping bisect
@rustbot ping reduce
@rustbot ping apple
@rustbot ping macos
@rustbot ping ios
```

Keep in mind that these aliases are meant to make humans' life easier.
Expand Down
90 changes: 0 additions & 90 deletions src/doc/rustc-dev-guide/src/notification-groups/cleanup-crew.md

This file was deleted.

38 changes: 0 additions & 38 deletions src/doc/rustc-dev-guide/src/notification-groups/llvm.md

This file was deleted.

29 changes: 0 additions & 29 deletions src/doc/rustc-dev-guide/src/rustdoc-internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,35 +270,6 @@ in `test.rs` is the function `make_test`, which is where hand-written
Some extra reading about `make_test` can be found
[here](https://quietmisdreavus.net/code/2018/02/23/how-the-doctests-get-made/).

## Dotting i's And Crossing t's

So that's `rustdoc`'s code in a nutshell, but there's more things in the
compiler that deal with it. Since we have the full `compiletest` suite at hand,
there's a set of tests in `tests/rustdoc` that make sure the final `HTML` is
what we expect in various situations. These tests also use a supplementary
script, `src/etc/htmldocck.py`, that allows it to look through the final `HTML`
using `XPath` notation to get a precise look at the output. The full
description of all the commands available to `rustdoc` tests (e.g. [`@has`] and
[`@matches`]) is in [`htmldocck.py`].

To use multiple crates in a `rustdoc` test, add `//@ aux-build:filename.rs`
to the top of the test file. `filename.rs` should be placed in an `auxiliary`
directory relative to the test file with the comment. If you need to build
docs for the auxiliary file, use `//@ build-aux-docs`.

In addition, there are separate tests for the search index and `rustdoc`'s
ability to query it. The files in `tests/rustdoc-js` each contain a
different search query and the expected results, broken out by search tab.
These files are processed by a script in `src/tools/rustdoc-js` and the `Node.js`
runtime. These tests don't have as thorough of a writeup, but a broad example
that features results in all tabs can be found in `basic.js`. The basic idea is
that you match a given `QUERY` with a set of `EXPECTED` results, complete with
the full item path of each item.

[`@has`]: https://github.com/rust-lang/rust/blob/master/src/etc/htmldocck.py#L39
[`@matches`]: https://github.com/rust-lang/rust/blob/master/src/etc/htmldocck.py#L44
[`htmldocck.py`]: https://github.com/rust-lang/rust/blob/master/src/etc/htmldocck.py

## Testing Locally

Some features of the generated `HTML` documentation might require local
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# The `rustdoc-gui` test suite

> **FIXME**: This section is a stub. Please help us flesh it out!

This page is about the test suite named `rustdoc-gui` used to test the "GUI" of `rustdoc` (i.e., the HTML/JS/CSS as rendered in a browser).
For other rustdoc-specific test suites, see [Rustdoc test suites].

These use a NodeJS-based tool called [`browser-UI-test`] that uses [puppeteer] to run tests in a headless browser and check rendering and interactivity. For information on how to write this form of test, see [`tests/rustdoc-gui/README.md`][rustdoc-gui-readme] as well as [the description of the `.goml` format][goml-script]

[Rustdoc test suites]: ../tests/compiletest.md#rustdoc-test-suites
[`browser-UI-test`]: https://github.com/GuillaumeGomez/browser-UI-test/
[puppeteer]: https://pptr.dev/
[rustdoc-gui-readme]: https://github.com/rust-lang/rust/blob/master/tests/rustdoc-gui/README.md
[goml-script]: https://github.com/GuillaumeGomez/browser-UI-test/blob/master/goml-script.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The `rustdoc-json` test suite

> **FIXME**: This section is a stub. It will be populated by [PR #2422](https://github.com/rust-lang/rustc-dev-guide/pull/2422/).
Loading
Loading