Skip to content

Rustc dev guide subtree update #139523

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 13 commits into from
Apr 9, 2025
Merged
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/book.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[book]
title = "Rust Compiler Development Guide"
author = "The Rust Project Developers"
authors = ["The Rust Project Developers"]
description = "A guide to developing the Rust compiler (rustc)"

[build]
Expand Down
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 @@
ae9173d7dd4a31806c950c90dcc331f1508b4d17
25a615bf829b9f6d6f22da537e3851043f92e5f2
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/src/backend/libs-and-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ See [`compute_hir_hash`] for where the hash is actually computed.

[SVH]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_data_structures/svh/struct.Svh.html
[incremental compilation]: ../queries/incremental-compilation.md
[`compute_hir_hash`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast_lowering/struct.LoweringContext.html#method.compute_hir_hash
[`compute_hir_hash`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast_lowering/fn.compute_hir_hash.html

### Stable Crate Id

Expand Down
6 changes: 5 additions & 1 deletion src/doc/rustc-dev-guide/src/rustdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ does is call the `main()` that's in this crate's `lib.rs`, though.)
are in `tests/rustdoc-gui`. These use a [NodeJS tool called
browser-UI-test](https://github.com/GuillaumeGomez/browser-UI-test/) that uses
puppeteer to run tests in a headless browser and check rendering and
interactivity.
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]
* Additionally, JavaScript type annotations are written using [TypeScript-flavored JSDoc]
comments and an external d.ts file. The code itself is plain, valid JavaScript; we only
use tsc as a linter.
Expand All @@ -100,6 +102,8 @@ does is call the `main()` that's in this crate's `lib.rs`, though.)
[These tests have several extra directives available to them](./rustdoc-internals/rustdoc-test-suite.md).

[TypeScript-flavored JSDoc]: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html
[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

## Constraints

Expand Down
3 changes: 2 additions & 1 deletion src/doc/rustc-dev-guide/src/tests/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
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` [run-make tests](compiletest.md#run-make-tests).
Directives are special comments that tell compiletest how to build and interpret a 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
5 changes: 3 additions & 2 deletions src/doc/rustc-dev-guide/src/tests/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,9 @@ But for strict testing, try to use the `ERROR` annotation as much as possible,
including `//~?` annotations for diagnostics without span.
For compile time diagnostics `error-pattern` should very rarely be necessary.

Per-line annotations (`//~`) are still checked in tests using `error-pattern`,
to opt out of these checks in exceptional cases use `//@ compile-flags: --error-format=human`.
Per-line annotations (`//~`) are still checked in tests using `error-pattern`.
To opt out of these checks, use `//@ compile-flags: --error-format=human`.
Do that only in exceptional cases.

### Error levels

Expand Down
Loading