From 4b1e25cee0cd5935295c48bd7bb72d8f9cedbdc4 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Mon, 27 Oct 2025 11:57:32 -0700 Subject: [PATCH 1/5] rustdoc-search: add an integration test for CCI Part of https://github.com/rust-lang/rust/issues/130676 --- src/rustdoc-internals/search.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/rustdoc-internals/search.md b/src/rustdoc-internals/search.md index beff0a94c..9cf59ea0c 100644 --- a/src/rustdoc-internals/search.md +++ b/src/rustdoc-internals/search.md @@ -521,4 +521,25 @@ const EXPECTED = [ returned: [], }, ] -``` \ No newline at end of file +``` + +If the [`//@ revisions`] directive is used, the JS file will +have access to a variable called `REVISION`. + +```js +const EXPECTED = [ + // This first test targets name-based search. + { + query: "constructor", + others: REVISION === "has_constructor" ? + [ + { path: "constructor_search", name: "constructor" }, + ] : + [], + in_args: [], + returned: [], + }, +]; +``` + +[`//@ revisions`]: ../tests/compiletest.md#revisions From 1a50906c14e275d558a687d8daf11deb4bd1b221 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 29 Oct 2025 14:02:02 +0100 Subject: [PATCH 2/5] Add rustc-dev-guide documentation for new `--bypass-ignore-backends` command line flag --- src/tests/directives.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tests/directives.md b/src/tests/directives.md index 12ceef0c9..045c8c71f 100644 --- a/src/tests/directives.md +++ b/src/tests/directives.md @@ -207,7 +207,9 @@ settings: on `wasm32-unknown-unknown` target because the target does not support the `proc-macro` crate type. - `needs-target-std` — ignores if target platform does not have std support. -- `ignore-backends` — ignores the listed backends, separated by whitespace characters. +- `ignore-backends` — ignores the listed backends, separated by whitespace characters. Please note + that this directive can be overriden with the `--bypass-ignore-backends=[BACKEND]` command line + flag. - `needs-backends` — only runs the test if current codegen backend is listed. The following directives will check LLVM support: From 434923654521061587db1647d3dba9ac05fade42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Sun, 2 Nov 2025 11:03:31 +0100 Subject: [PATCH 3/5] Generalize branch references to HEAD --- src/appendix/code-index.md | 2 +- src/appendix/humorust.md | 2 +- src/attributes.md | 2 +- src/backend/updating-llvm.md | 2 +- src/borrow_check/region_inference.md | 2 +- .../bootstrapping/how-bootstrap-does-it.md | 10 ++-- .../bootstrapping/what-bootstrapping-does.md | 10 ++-- src/building/prerequisites.md | 2 +- src/building/suggested.md | 12 ++-- src/compiler-debugging.md | 4 +- src/compiler-src.md | 58 +++++++++---------- src/compiler-team.md | 2 +- src/const-eval/interpret.md | 6 +- src/contributing.md | 6 +- src/external-repos.md | 2 +- src/getting-started.md | 2 +- src/git.md | 2 +- src/guides/editions.md | 4 +- src/incrcomp-debugging.md | 2 +- src/licenses.md | 4 +- src/llvm-coverage-instrumentation.md | 10 ++-- src/macro-expansion.md | 2 +- src/mir/drop-elaboration.md | 6 +- src/mir/optimizations.md | 4 +- src/notification-groups/about.md | 2 +- src/overview.md | 10 ++-- src/panic-implementation.md | 2 +- src/profile-guided-optimization.md | 4 +- src/rustdoc-internals.md | 22 +++---- .../rustdoc-gui-test-suite.md | 2 +- .../rustdoc-json-test-suite.md | 6 +- src/rustdoc-internals/rustdoc-test-suite.md | 2 +- src/rustdoc-internals/search.md | 2 +- src/rustdoc.md | 4 +- src/sanitizers.md | 4 +- src/serialization.md | 4 +- src/solve/opaque-types.md | 2 +- src/solve/significant-changes.md | 2 +- src/stabilization_guide.md | 8 +-- src/test-implementation.md | 2 +- src/tests/adding.md | 2 +- src/tests/ci.md | 10 ++-- src/tests/compiletest.md | 32 +++++----- src/tests/directives.md | 10 ++-- src/tests/docker.md | 8 +-- src/tests/intro.md | 8 +-- src/tests/minicore.md | 2 +- src/tests/running.md | 12 ++-- src/tests/ui.md | 10 ++-- src/tracing.md | 2 +- src/traits/chalk.md | 2 +- src/traits/goals-and-clauses.md | 2 +- src/ty-fold.md | 2 +- src/unsafety-checking.md | 2 +- src/walkthrough.md | 2 +- 55 files changed, 171 insertions(+), 171 deletions(-) diff --git a/src/appendix/code-index.md b/src/appendix/code-index.md index 4ddb58b0c..0795d83b2 100644 --- a/src/appendix/code-index.md +++ b/src/appendix/code-index.md @@ -12,7 +12,7 @@ Item | Kind | Short description | Chapter | `rustc_hir::Crate` | struct | A more abstract, compiler-friendly form of a crate's AST | [The Hir] | [compiler/rustc_hir/src/hir.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.Crate.html) `DefId` | struct | One of four types of HIR node identifiers | [Identifiers in the HIR] | [compiler/rustc_hir/src/def_id.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/def_id/struct.DefId.html) `Diag` | struct | A struct for a compiler diagnostic, such as an error or lint | [Emitting Diagnostics] | [compiler/rustc_errors/src/diagnostic.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/struct.Diag.html) -`DocContext` | struct | A state container used by rustdoc when crawling through a crate to gather its documentation | [Rustdoc] | [src/librustdoc/core.rs](https://github.com/rust-lang/rust/blob/master/src/librustdoc/core.rs) +`DocContext` | struct | A state container used by rustdoc when crawling through a crate to gather its documentation | [Rustdoc] | [src/librustdoc/core.rs](https://github.com/rust-lang/rust/blob/HEAD/src/librustdoc/core.rs) `HirId` | struct | One of four types of HIR node identifiers | [Identifiers in the HIR] | [compiler/rustc_hir_id/src/lib.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/struct.HirId.html) `Lexer` | struct | This is the lexer used during parsing. It consumes characters from the raw source code being compiled and produces a series of tokens for use by the rest of the parser | [The parser] | [compiler/rustc_parse/src/lexer/mod.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/lexer/struct.Lexer.html) `NodeId` | struct | One of four types of HIR node identifiers. Being phased out | [Identifiers in the HIR] | [compiler/rustc_ast/src/ast.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/node_id/struct.NodeId.html) diff --git a/src/appendix/humorust.md b/src/appendix/humorust.md index 8681512ed..ea8623c96 100644 --- a/src/appendix/humorust.md +++ b/src/appendix/humorust.md @@ -3,7 +3,7 @@ What's a project without a sense of humor? And frankly some of these are enlightening? -- [Weird exprs test](https://github.com/rust-lang/rust/blob/master/tests/ui/expr/weird-exprs.rs) +- [Weird exprs test](https://github.com/rust-lang/rust/blob/HEAD/tests/ui/expr/weird-exprs.rs) - [Ferris Rap](https://fitzgen.com/2018/12/13/rust-raps.html) - [The Genesis of Generic Germination](https://github.com/rust-lang/rust/pull/53645#issue-210543221) - [The Bastion of the Turbofish test](https://github.com/rust-lang/rust/blob/79d8a0fcefa5134db2a94739b1d18daa01fc6e9f/src/test/ui/bastion-of-the-turbofish.rs) diff --git a/src/attributes.md b/src/attributes.md index aae856348..2a812a17d 100644 --- a/src/attributes.md +++ b/src/attributes.md @@ -35,7 +35,7 @@ Definitions of non-builtin attributes take two forms: 2. AST-based attributes, defined in the standard library. These attributes have special 'stub' macros defined in places like [`library/core/src/macros/mod.rs`][core_macros]. -[core_macros]: https://github.com/rust-lang/rust/blob/master/library/core/src/macros/mod.rs +[core_macros]: https://github.com/rust-lang/rust/blob/HEAD/library/core/src/macros/mod.rs These definitions exist to allow the macros to participate in typical path-based resolution - they can be imported, re-exported, and renamed just like any other item definition. However, the body of diff --git a/src/backend/updating-llvm.md b/src/backend/updating-llvm.md index ebef15d40..70deeebf8 100644 --- a/src/backend/updating-llvm.md +++ b/src/backend/updating-llvm.md @@ -224,7 +224,7 @@ keep in mind while going through them: [rust-lang/llvm-project repository]: https://github.com/rust-lang/llvm-project [llvm/llvm-project repository]: https://github.com/llvm/llvm-project -[`llvm-wrapper`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_llvm/llvm-wrapper +[`llvm-wrapper`]: https://github.com/rust-lang/rust/tree/HEAD/compiler/rustc_llvm/llvm-wrapper [wg-llvm]: https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm [Dev Desktops]: https://forge.rust-lang.org/infra/docs/dev-desktop.html [backport process]: https://llvm.org/docs/GitHub.html#backporting-fixes-to-the-release-branches diff --git a/src/borrow_check/region_inference.md b/src/borrow_check/region_inference.md index 0d55ab955..ba67bec45 100644 --- a/src/borrow_check/region_inference.md +++ b/src/borrow_check/region_inference.md @@ -81,7 +81,7 @@ For each region we maintain a set storing what elements are present in its value efficient, we give each kind of element an index, the `RegionElementIndex`, and use sparse bitsets). -[ri]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_borrowck/src/region_infer +[ri]: https://github.com/rust-lang/rust/tree/HEAD/compiler/rustc_borrowck/src/region_infer The kinds of region elements are as follows: diff --git a/src/building/bootstrapping/how-bootstrap-does-it.md b/src/building/bootstrapping/how-bootstrap-does-it.md index 6b32845f0..4d301b3ab 100644 --- a/src/building/bootstrapping/how-bootstrap-does-it.md +++ b/src/building/bootstrapping/how-bootstrap-does-it.md @@ -39,12 +39,12 @@ pub trait Step: 'static + Clone + Debug + PartialEq + Eq + Hash { There's a couple of preliminary steps before core Bootstrap code is reached: -1. Shell script or `make`: [`./x`](https://github.com/rust-lang/rust/blob/master/x) or [`./x.ps1`](https://github.com/rust-lang/rust/blob/master/x.ps1) or `make` -2. Convenience wrapper script: [`x.py`](https://github.com/rust-lang/rust/blob/master/x.py) -3. [`src/bootstrap/bootstrap.py`](https://github.com/rust-lang/rust/blob/master/src/bootstrap/bootstrap.py) -4. [`src/bootstrap/src/bin/main.rs`](https://github.com/rust-lang/rust/blob/master/src/bootstrap/src/bin/main.rs) +1. Shell script or `make`: [`./x`](https://github.com/rust-lang/rust/blob/HEAD/x) or [`./x.ps1`](https://github.com/rust-lang/rust/blob/HEAD/x.ps1) or `make` +2. Convenience wrapper script: [`x.py`](https://github.com/rust-lang/rust/blob/HEAD/x.py) +3. [`src/bootstrap/bootstrap.py`](https://github.com/rust-lang/rust/blob/HEAD/src/bootstrap/bootstrap.py) +4. [`src/bootstrap/src/bin/main.rs`](https://github.com/rust-lang/rust/blob/HEAD/src/bootstrap/src/bin/main.rs) -See [src/bootstrap/README.md](https://github.com/rust-lang/rust/blob/master/src/bootstrap/README.md) +See [src/bootstrap/README.md](https://github.com/rust-lang/rust/blob/HEAD/src/bootstrap/README.md) for a more specific description of the implementation details. [`Step`]: https://doc.rust-lang.org/nightly/nightly-rustc/bootstrap/core/builder/trait.Step.html diff --git a/src/building/bootstrapping/what-bootstrapping-does.md b/src/building/bootstrapping/what-bootstrapping-does.md index bfd75ebda..89eca0f0a 100644 --- a/src/building/bootstrapping/what-bootstrapping-does.md +++ b/src/building/bootstrapping/what-bootstrapping-does.md @@ -12,12 +12,12 @@ only way to build a modern version of `rustc` is with a slightly less modern ver This is exactly how [`./x.py`] works: it downloads the current beta release of `rustc`, then uses it to compile the new compiler. -[`./x.py`]: https://github.com/rust-lang/rust/blob/master/x.py +[`./x.py`]: https://github.com/rust-lang/rust/blob/HEAD/x.py Note that this documentation mostly covers user-facing information. See [bootstrap/README.md][bootstrap-internals] to read about bootstrap internals. -[bootstrap-internals]: https://github.com/rust-lang/rust/blob/master/src/bootstrap/README.md +[bootstrap-internals]: https://github.com/rust-lang/rust/blob/HEAD/src/bootstrap/README.md ## Stages of bootstrapping @@ -74,8 +74,8 @@ build the stage2 compiler. There are two concepts at play here: a compiler (with its set of dependencies) and its 'target' or 'object' libraries (`std` and `rustc`). Both are staged, but in a staggered manner. -[`compiler/rustc`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc -[`src/bootstrap`]: https://github.com/rust-lang/rust/tree/master/src/bootstrap +[`compiler/rustc`]: https://github.com/rust-lang/rust/tree/HEAD/compiler/rustc +[`src/bootstrap`]: https://github.com/rust-lang/rust/tree/HEAD/src/bootstrap ### Stage 1: from current code, by an earlier compiler @@ -129,7 +129,7 @@ You can always override the stage by passing `--stage N` explicitly. For more information about stages, [see below](#understanding-stages-of-bootstrap). -[`./x`]: https://github.com/rust-lang/rust/blob/master/x +[`./x`]: https://github.com/rust-lang/rust/blob/HEAD/x ## Complications of bootstrapping diff --git a/src/building/prerequisites.md b/src/building/prerequisites.md index 6761cabac..d984cc4e3 100644 --- a/src/building/prerequisites.md +++ b/src/building/prerequisites.md @@ -2,7 +2,7 @@ ## Dependencies -See [the `rust-lang/rust` INSTALL](https://github.com/rust-lang/rust/blob/master/INSTALL.md#dependencies). +See [the `rust-lang/rust` INSTALL](https://github.com/rust-lang/rust/blob/HEAD/INSTALL.md#dependencies). ## Hardware diff --git a/src/building/suggested.md b/src/building/suggested.md index 6d3590eef..6d7d340e6 100644 --- a/src/building/suggested.md +++ b/src/building/suggested.md @@ -451,15 +451,15 @@ pkgs.mkShell { If you use Bash, Zsh, Fish or PowerShell, you can find automatically-generated shell completion scripts for `x.py` in -[`src/etc/completions`](https://github.com/rust-lang/rust/tree/master/src/etc/completions). +[`src/etc/completions`](https://github.com/rust-lang/rust/tree/HEAD/src/etc/completions). You can use `source ./src/etc/completions/x.py.` to load completions for your shell of choice, or `& .\src\etc\completions\x.py.ps1` for PowerShell. Adding this to your shell's startup script (e.g. `.bashrc`) will automatically load this completion. -[`src/etc/rust_analyzer_settings.json`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_settings.json -[`src/etc/rust_analyzer_eglot.el`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_eglot.el -[`src/etc/rust_analyzer_helix.toml`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_helix.toml -[`src/etc/rust_analyzer_zed.json`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_zed.json -[`src/etc/pre-push.sh`]: https://github.com/rust-lang/rust/blob/master/src/etc/pre-push.sh +[`src/etc/rust_analyzer_settings.json`]: https://github.com/rust-lang/rust/blob/HEAD/src/etc/rust_analyzer_settings.json +[`src/etc/rust_analyzer_eglot.el`]: https://github.com/rust-lang/rust/blob/HEAD/src/etc/rust_analyzer_eglot.el +[`src/etc/rust_analyzer_helix.toml`]: https://github.com/rust-lang/rust/blob/HEAD/src/etc/rust_analyzer_helix.toml +[`src/etc/rust_analyzer_zed.json`]: https://github.com/rust-lang/rust/blob/HEAD/src/etc/rust_analyzer_zed.json +[`src/etc/pre-push.sh`]: https://github.com/rust-lang/rust/blob/HEAD/src/etc/pre-push.sh diff --git a/src/compiler-debugging.md b/src/compiler-debugging.md index f45144704..1944bf533 100644 --- a/src/compiler-debugging.md +++ b/src/compiler-debugging.md @@ -158,7 +158,7 @@ error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. -note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports +note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/HEAD/CONTRIBUTING.md#bug-reports note: rustc 1.24.0-dev running on x86_64-unknown-linux-gnu @@ -284,7 +284,7 @@ Here are some notable ones: Right below you can find elaborate explainers on a selected few. -[`builtin_attrs`]: https://github.com/rust-lang/rust/blob/master/compiler/rustc_feature/src/builtin_attrs.rs +[`builtin_attrs`]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_feature/src/builtin_attrs.rs [`def_path_str`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.def_path_str [`inferred_outlives_of`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.inferred_outlives_of [`item_bounds`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.item_bounds diff --git a/src/compiler-src.md b/src/compiler-src.md index 27b40f1fe..9b19c6fa9 100644 --- a/src/compiler-src.md +++ b/src/compiler-src.md @@ -32,23 +32,23 @@ The repository consists of three main directories: - [`src/`] contains the source code for [`rustdoc`], [`clippy`], [`cargo`], the build system, language docs, etc. -[`alloc`]: https://github.com/rust-lang/rust/tree/master/library/alloc +[`alloc`]: https://github.com/rust-lang/rust/tree/HEAD/library/alloc [`backtrace`]: https://github.com/rust-lang/backtrace-rs/ [`cargo`]: https://github.com/rust-lang/cargo -[`clippy`]: https://github.com/rust-lang/rust/tree/master/src/tools/clippy -[`compiler/`]: https://github.com/rust-lang/rust/tree/master/compiler -[`core`]: https://github.com/rust-lang/rust/tree/master/library/core -[`etc`]: https://github.com/rust-lang/rust/tree/master/src/etc -[`lang_start`]: https://github.com/rust-lang/rust/blob/master/library/std/src/rt.rs -[`library/`]: https://github.com/rust-lang/rust/tree/master/library -[`proc_macro`]: https://github.com/rust-lang/rust/tree/master/library/proc_macro -[`rtstartup`]: https://github.com/rust-lang/rust/tree/master/library/rtstartup +[`clippy`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/clippy +[`compiler/`]: https://github.com/rust-lang/rust/tree/HEAD/compiler +[`core`]: https://github.com/rust-lang/rust/tree/HEAD/library/core +[`etc`]: https://github.com/rust-lang/rust/tree/HEAD/src/etc +[`lang_start`]: https://github.com/rust-lang/rust/blob/HEAD/library/std/src/rt.rs +[`library/`]: https://github.com/rust-lang/rust/tree/HEAD/library +[`proc_macro`]: https://github.com/rust-lang/rust/tree/HEAD/library/proc_macro +[`rtstartup`]: https://github.com/rust-lang/rust/tree/HEAD/library/rtstartup [`rust-lang/rust`]: https://github.com/rust-lang/rust -[`rustdoc`]: https://github.com/rust-lang/rust/tree/master/src/tools/rustdoc -[`src/`]: https://github.com/rust-lang/rust/tree/master/src -[`std`]: https://github.com/rust-lang/rust/tree/master/library/std -[`test`]: https://github.com/rust-lang/rust/tree/master/library/test -[`tests/`]: https://github.com/rust-lang/rust/tree/master/tests +[`rustdoc`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/rustdoc +[`src/`]: https://github.com/rust-lang/rust/tree/HEAD/src +[`std`]: https://github.com/rust-lang/rust/tree/HEAD/library/std +[`test`]: https://github.com/rust-lang/rust/tree/HEAD/library/test +[`tests/`]: https://github.com/rust-lang/rust/tree/HEAD/tests ## Compiler @@ -99,9 +99,9 @@ compiler can interface with it. Most of this book is about the compiler, so we won't have any further explanation of these crates here. -[`compiler/rustc_llvm`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_llvm -[`src/llvm-project`]: https://github.com/rust-lang/rust/tree/master/src/ -[`Cargo.toml`]: https://github.com/rust-lang/rust/blob/master/Cargo.toml +[`compiler/rustc_llvm`]: https://github.com/rust-lang/rust/tree/HEAD/compiler/rustc_llvm +[`src/llvm-project`]: https://github.com/rust-lang/rust/tree/HEAD/src/ +[`Cargo.toml`]: https://github.com/rust-lang/rust/blob/HEAD/Cargo.toml ### Big picture @@ -160,10 +160,10 @@ You can read more about [`rustdoc`] in [this chapter][rustdoc-chapter]. [`librustdoc`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/index.html [`rustdoc::main`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/fn.main.html -[`src/tools/rustdoc-js`]: https://github.com/rust-lang/rust/tree/master/src/tools/rustdoc-js -[`src/tools/rustdoc-themes`]: https://github.com/rust-lang/rust/tree/master/src/tools/rustdoc-themes -[`src/tools/rustdoc`]: https://github.com/rust-lang/rust/tree/master/src/tools/rustdoc -[`src/rustdoc-json-types`]: https://github.com/rust-lang/rust/tree/master/src/rustdoc-json-types +[`src/tools/rustdoc-js`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/rustdoc-js +[`src/tools/rustdoc-themes`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/rustdoc-themes +[`src/tools/rustdoc`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/rustdoc +[`src/rustdoc-json-types`]: https://github.com/rust-lang/rust/tree/HEAD/src/rustdoc-json-types [rustdoc-chapter]: ./rustdoc.md ## Tests @@ -173,7 +173,7 @@ about the test suite [in this chapter][testsch]. The test harness is in [`src/tools/compiletest/`][`compiletest/`]. -[`tests/`]: https://github.com/rust-lang/rust/tree/master/tests +[`tests/`]: https://github.com/rust-lang/rust/tree/HEAD/tests [testsch]: ./tests/intro.md ## Build System @@ -186,10 +186,10 @@ One of the primary tools is [`src/bootstrap/`]. You can read more about bootstrapping [in this chapter][bootstch]. The process may also use other tools from [`src/tools/`], such as [`tidy/`] or [`compiletest/`]. -[`compiletest/`]: https://github.com/rust-lang/rust/tree/master/src/tools/compiletest -[`src/bootstrap/`]: https://github.com/rust-lang/rust/tree/master/src/bootstrap -[`src/tools/`]: https://github.com/rust-lang/rust/tree/master/src/tools -[`tidy/`]: https://github.com/rust-lang/rust/tree/master/src/tools/tidy +[`compiletest/`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/compiletest +[`src/bootstrap/`]: https://github.com/rust-lang/rust/tree/HEAD/src/bootstrap +[`src/tools/`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools +[`tidy/`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/tidy [bootstch]: ./building/bootstrapping/intro.md ## Standard library @@ -213,6 +213,6 @@ These include: - [`src/etc`]: Miscellaneous utilities. - And more... -[`src/ci`]: https://github.com/rust-lang/rust/tree/master/src/ci -[`src/doc`]: https://github.com/rust-lang/rust/tree/master/src/doc -[`src/etc`]: https://github.com/rust-lang/rust/tree/master/src/etc +[`src/ci`]: https://github.com/rust-lang/rust/tree/HEAD/src/ci +[`src/doc`]: https://github.com/rust-lang/rust/tree/HEAD/src/doc +[`src/etc`]: https://github.com/rust-lang/rust/tree/HEAD/src/etc diff --git a/src/compiler-team.md b/src/compiler-team.md index 9556811e8..dfc1e7eed 100644 --- a/src/compiler-team.md +++ b/src/compiler-team.md @@ -29,7 +29,7 @@ check out [triagebot.toml's assign section][map]. It contains a listing of the various parts of the compiler and a list of people who are reviewers of each part. -[map]: https://github.com/rust-lang/rust/blob/master/triagebot.toml +[map]: https://github.com/rust-lang/rust/blob/HEAD/triagebot.toml ## Rust compiler meeting diff --git a/src/const-eval/interpret.md b/src/const-eval/interpret.md index 08382b12f..8487b2bed 100644 --- a/src/const-eval/interpret.md +++ b/src/const-eval/interpret.md @@ -106,7 +106,7 @@ the interpreter, but just use the cached result. ## Datastructures The interpreter's outside-facing datastructures can be found in -[rustc_middle/src/mir/interpret](https://github.com/rust-lang/rust/blob/master/compiler/rustc_middle/src/mir/interpret). +[rustc_middle/src/mir/interpret](https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_middle/src/mir/interpret). This is mainly the error enum and the [`ConstValue`] and [`Scalar`] types. A `ConstValue` can be either `Scalar` (a single `Scalar`, i.e., integer or thin pointer), `Slice` (to represent byte slices and strings, as needed for pattern @@ -217,7 +217,7 @@ function with no arguments, except that constants do not allow local (named) variables at the time of writing this guide. A stack frame is defined by the `Frame` type in -[rustc_const_eval/src/interpret/eval_context.rs](https://github.com/rust-lang/rust/blob/master/compiler/rustc_const_eval/src/interpret/eval_context.rs) +[rustc_const_eval/src/interpret/eval_context.rs](https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_const_eval/src/interpret/eval_context.rs) and contains all the local variables memory (`None` at the start of evaluation). Each frame refers to the evaluation of either the root constant or subsequent calls to `const fn`. The @@ -229,7 +229,7 @@ The frames are just a `Vec`, there's no way to actually refer to a memory that can be referred to are `Allocation`s. The interpreter now calls the `step` method (in -[rustc_const_eval/src/interpret/step.rs](https://github.com/rust-lang/rust/blob/master/compiler/rustc_const_eval/src/interpret/step.rs) +[rustc_const_eval/src/interpret/step.rs](https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_const_eval/src/interpret/step.rs) ) until it either returns an error or has no further statements to execute. Each statement will now initialize or modify the locals or the virtual memory referred to by a local. This might require evaluating other constants or diff --git a/src/contributing.md b/src/contributing.md index 44d630080..366c3e45a 100644 --- a/src/contributing.md +++ b/src/contributing.md @@ -145,7 +145,7 @@ when contributing to Rust under [the git section](./git.md). [about-pull-requests]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests [development-models]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/getting-started/about-collaborative-development-models#fork-and-pull-model [t-compiler]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler -[triagebot]: https://github.com/rust-lang/rust/blob/master/triagebot.toml +[triagebot]: https://github.com/rust-lang/rust/blob/HEAD/triagebot.toml ### Keeping your branch up-to-date @@ -357,8 +357,8 @@ is located in [`src/doc`] in the tree, and standard API documentation is generat from the source code itself (e.g. [`library/std/src/lib.rs`][std-root]). Documentation pull requests function in the same way as other pull requests. -[`src/doc`]: https://github.com/rust-lang/rust/tree/master/src/doc -[std-root]: https://github.com/rust-lang/rust/blob/master/library/std/src/lib.rs#L1 +[`src/doc`]: https://github.com/rust-lang/rust/tree/HEAD/src/doc +[std-root]: https://github.com/rust-lang/rust/blob/HEAD/library/std/src/lib.rs#L1 To find documentation-related issues, use the [A-docs label]. diff --git a/src/external-repos.md b/src/external-repos.md index 5fb7eeee8..fb291aa77 100644 --- a/src/external-repos.md +++ b/src/external-repos.md @@ -167,7 +167,7 @@ before the PR is merged. They are also not allowed to be broken on master in the week leading up to the beta cut. [git submodules]: https://git-scm.com/book/en/v2/Git-Tools-Submodules -[`.gitmodules`]: https://github.com/rust-lang/rust/blob/master/.gitmodules +[`.gitmodules`]: https://github.com/rust-lang/rust/blob/HEAD/.gitmodules [The Rust Reference]: https://github.com/rust-lang/reference/ [toolstate website]: https://rust-lang-nursery.github.io/rust-toolstate/ [Toolstate chapter]: https://forge.rust-lang.org/infra/toolstate.html diff --git a/src/getting-started.md b/src/getting-started.md index 685b97329..857e8ff51 100644 --- a/src/getting-started.md +++ b/src/getting-started.md @@ -59,7 +59,7 @@ you could run `git shortlog -n 1.68.2.. compiler/rustc_resolve/`. Ignore any com "Rollup merge" or commits by `@bors` (see [CI contribution procedures](./contributing.md#ci) for more information about these commits). -[map]: https://github.com/rust-lang/rust/blob/master/triagebot.toml +[map]: https://github.com/rust-lang/rust/blob/HEAD/triagebot.toml ### Etiquette diff --git a/src/git.md b/src/git.md index 8f0511a45..56f1f01f2 100644 --- a/src/git.md +++ b/src/git.md @@ -638,7 +638,7 @@ checkouts for you. Some commits contain large reformatting changes that don't otherwise change functionality. They can be instructed to be ignored by `git blame` through -[`.git-blame-ignore-revs`](https://github.com/rust-lang/rust/blob/master/.git-blame-ignore-revs): +[`.git-blame-ignore-revs`](https://github.com/rust-lang/rust/blob/HEAD/.git-blame-ignore-revs): 1. Configure `git blame` to use `.git-blame-ignore-revs` as the list of commits to ignore: `git config blame.ignorerevsfile .git-blame-ignore-revs` diff --git a/src/guides/editions.md b/src/guides/editions.md index b65fbb13c..107d5e737 100644 --- a/src/guides/editions.md +++ b/src/guides/editions.md @@ -375,8 +375,8 @@ After the edition team has given the go-ahead, the process for stabilizing an ed - Update [`LATEST_STABLE_EDITION`]. - Update [`Edition::is_stable`]. - Hunt and find any document that refers to edition by number, and update it: - - [`--edition` flag](https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/command-line-arguments.md#--edition-specify-the-edition-to-use) - - [Rustdoc attributes](https://github.com/rust-lang/rust/blob/master/src/doc/rustdoc/src/write-documentation/documentation-tests.md#attributes) + - [`--edition` flag](https://github.com/rust-lang/rust/blob/HEAD/src/doc/rustc/src/command-line-arguments.md#--edition-specify-the-edition-to-use) + - [Rustdoc attributes](https://github.com/rust-lang/rust/blob/HEAD/src/doc/rustdoc/src/write-documentation/documentation-tests.md#attributes) - Clean up any tests that use the `//@ edition` header to remove the `-Zunstable-options` flag to ensure they are indeed stable. Note: Ideally this should be automated, see [#133582]. - Bless any tests that change. - Update `lint-docs` to default to the new edition. diff --git a/src/incrcomp-debugging.md b/src/incrcomp-debugging.md index a548215cf..8207b8166 100644 --- a/src/incrcomp-debugging.md +++ b/src/incrcomp-debugging.md @@ -7,7 +7,7 @@ simplest mechanisms are the `#[rustc_if_this_changed]` and `#[rustc_then_this_would_need]` annotations. These are used in [ui] tests to test whether the expected set of paths exist in the dependency graph. -[`tests/ui/dep-graph/dep-graph-caller-callee.rs`]: https://github.com/rust-lang/rust/blob/master/tests/ui/dep-graph/dep-graph-caller-callee.rs +[`tests/ui/dep-graph/dep-graph-caller-callee.rs`]: https://github.com/rust-lang/rust/blob/HEAD/tests/ui/dep-graph/dep-graph-caller-callee.rs [ui]: tests/ui.html As an example, see [`tests/ui/dep-graph/dep-graph-caller-callee.rs`], or the diff --git a/src/licenses.md b/src/licenses.md index 1d5158a9c..c4fc59d27 100644 --- a/src/licenses.md +++ b/src/licenses.md @@ -1,8 +1,8 @@ # `rust-lang/rust` Licenses -The `rustc` compiler source and standard library are dual licensed under the [Apache License v2.0](https://github.com/rust-lang/rust/blob/master/LICENSE-APACHE) and the [MIT License](https://github.com/rust-lang/rust/blob/master/LICENSE-MIT) unless otherwise specified. +The `rustc` compiler source and standard library are dual licensed under the [Apache License v2.0](https://github.com/rust-lang/rust/blob/HEAD/LICENSE-APACHE) and the [MIT License](https://github.com/rust-lang/rust/blob/HEAD/LICENSE-MIT) unless otherwise specified. -Detailed licensing information is available in the [COPYRIGHT document](https://github.com/rust-lang/rust/blob/master/COPYRIGHT) of the `rust-lang/rust` repository. +Detailed licensing information is available in the [COPYRIGHT document](https://github.com/rust-lang/rust/blob/HEAD/COPYRIGHT) of the `rust-lang/rust` repository. ## Guidelines for reviewers diff --git a/src/llvm-coverage-instrumentation.md b/src/llvm-coverage-instrumentation.md index 288b90f33..30a1c5ebc 100644 --- a/src/llvm-coverage-instrumentation.md +++ b/src/llvm-coverage-instrumentation.md @@ -130,8 +130,8 @@ and `mir-opt` tests can be refreshed by running: ./x test tests/mir-opt --bless ``` -[`tests/mir-opt/coverage/instrument_coverage.rs`]: https://github.com/rust-lang/rust/blob/master/tests/mir-opt/coverage/instrument_coverage.rs -[`tests/coverage`]: https://github.com/rust-lang/rust/tree/master/tests/coverage -[`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 -[`tests/codegen-llvm/instrument-coverage/testprog.rs`]: https://github.com/rust-lang/rust/blob/master/tests/mir-opt/coverage/instrument_coverage.rs +[`tests/mir-opt/coverage/instrument_coverage.rs`]: https://github.com/rust-lang/rust/blob/HEAD/tests/mir-opt/coverage/instrument_coverage.rs +[`tests/coverage`]: https://github.com/rust-lang/rust/tree/HEAD/tests/coverage +[`src/tools/coverage-dump`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/coverage-dump +[`tests/coverage-run-rustdoc`]: https://github.com/rust-lang/rust/tree/HEAD/tests/coverage-run-rustdoc +[`tests/codegen-llvm/instrument-coverage/testprog.rs`]: https://github.com/rust-lang/rust/blob/HEAD/tests/mir-opt/coverage/instrument_coverage.rs diff --git a/src/macro-expansion.md b/src/macro-expansion.md index 96f12b764..f9ab94624 100644 --- a/src/macro-expansion.md +++ b/src/macro-expansion.md @@ -226,7 +226,7 @@ a macro author may want to introduce a new name to the context where the macro was called. Alternately, the macro author may be defining a variable for use only within the macro (i.e. it should not be visible outside the macro). -[code_dir]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_expand/src/mbe +[code_dir]: https://github.com/rust-lang/rust/tree/HEAD/compiler/rustc_expand/src/mbe [code_mp]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_expand/mbe/macro_parser [code_mr]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_expand/mbe/macro_rules [code_parse_int]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_expand/mbe/macro_parser/struct.TtParser.html#method.parse_tt diff --git a/src/mir/drop-elaboration.md b/src/mir/drop-elaboration.md index 4da612c83..93e21e2b2 100644 --- a/src/mir/drop-elaboration.md +++ b/src/mir/drop-elaboration.md @@ -188,6 +188,6 @@ known to be uninitialized) to run these checks. [RFC 320]: https://rust-lang.github.io/rfcs/0320-nonzeroing-dynamic-drop.html [reference-drop]: https://doc.rust-lang.org/reference/destructors.html -[drops]: https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_dataflow/src/elaborate_drops.rs -[drops-shim]: https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_transform/src/shim.rs -[drops-transform]: https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_transform/src/elaborate_drops.rs +[drops]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_mir_dataflow/src/elaborate_drops.rs +[drops-shim]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_mir_transform/src/shim.rs +[drops-transform]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_mir_transform/src/elaborate_drops.rs diff --git a/src/mir/optimizations.md b/src/mir/optimizations.md index 93eeb9a37..964fa063a 100644 --- a/src/mir/optimizations.md +++ b/src/mir/optimizations.md @@ -70,8 +70,8 @@ optimizes it, and returns the improved MIR. If you have any questions along the way, feel free to ask in `#t-compiler/wg-mir-opt` on Zulip. -[mir-opt-test-readme]: https://github.com/rust-lang/rust/blob/master/tests/mir-opt/README.md -[`compiler/rustc_mir_transform/src`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_mir_transform/src +[mir-opt-test-readme]: https://github.com/rust-lang/rust/blob/HEAD/tests/mir-opt/README.md +[`compiler/rustc_mir_transform/src`]: https://github.com/rust-lang/rust/tree/HEAD/compiler/rustc_mir_transform/src [`remove_storage_markers`]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_mir_transform/src/remove_storage_markers.rs [`run_optimization_passes()`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/fn.run_optimization_passes.html diff --git a/src/notification-groups/about.md b/src/notification-groups/about.md index d75891ecf..c649b930f 100644 --- a/src/notification-groups/about.md +++ b/src/notification-groups/about.md @@ -104,4 +104,4 @@ triage.** [rustbot]: https://github.com/rust-lang/triagebot/ [`ping`]: https://forge.rust-lang.org/triagebot/pinging.html -[`triagebot.toml`]: https://github.com/rust-lang/rust/blob/master/triagebot.toml +[`triagebot.toml`]: https://github.com/rust-lang/rust/blob/HEAD/triagebot.toml diff --git a/src/overview.md b/src/overview.md index 378d8c445..f83b5b2e1 100644 --- a/src/overview.md +++ b/src/overview.md @@ -63,10 +63,10 @@ Parsing is organized by semantic construct. Separate directory. The source file name follows the construct name. For example, the following files are found in the `parser`: -- [`expr.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_parse/src/parser/expr.rs) -- [`pat.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_parse/src/parser/pat.rs) -- [`ty.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_parse/src/parser/ty.rs) -- [`stmt.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_parse/src/parser/stmt.rs) +- [`expr.rs`](https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_parse/src/parser/expr.rs) +- [`pat.rs`](https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_parse/src/parser/pat.rs) +- [`ty.rs`](https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_parse/src/parser/ty.rs) +- [`stmt.rs`](https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_parse/src/parser/stmt.rs) This naming scheme is used across many compiler stages. You will find either a file or directory with the same name across the parsing, lowering, type @@ -164,7 +164,7 @@ the final binary. [parse_mod]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/parser/struct.Parser.html#method.parse_mod [parse_nonterminal]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/parser/struct.Parser.html#method.parse_nonterminal [parser]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/index.html -[rustc_parse_parser_dir]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_parse/src/parser +[rustc_parse_parser_dir]: https://github.com/rust-lang/rust/tree/HEAD/compiler/rustc_parse/src/parser [String interning]: https://en.wikipedia.org/wiki/String_interning [thir]: ./thir.md diff --git a/src/panic-implementation.md b/src/panic-implementation.md index dba3f2146..ea71abff1 100644 --- a/src/panic-implementation.md +++ b/src/panic-implementation.md @@ -110,4 +110,4 @@ In particular, in std's [runtime service], the call to the user-provided `main` function is wrapped in `catch_unwind`. -[runtime service]: https://github.com/rust-lang/rust/blob/master/library/std/src/rt.rs +[runtime service]: https://github.com/rust-lang/rust/blob/HEAD/library/std/src/rt.rs diff --git a/src/profile-guided-optimization.md b/src/profile-guided-optimization.md index 4e3dadd40..f8a07813a 100644 --- a/src/profile-guided-optimization.md +++ b/src/profile-guided-optimization.md @@ -129,8 +129,8 @@ in [run-make tests][rmake-tests] (the relevant tests have `pgo` in their name). There is also a [codegen test][codegen-test] that checks that some expected instrumentation artifacts show up in LLVM IR. -[rmake-tests]: https://github.com/rust-lang/rust/tree/master/tests/run-make -[codegen-test]: https://github.com/rust-lang/rust/blob/master/tests/codegen-llvm/pgo-instrumentation.rs +[rmake-tests]: https://github.com/rust-lang/rust/tree/HEAD/tests/run-make +[codegen-test]: https://github.com/rust-lang/rust/blob/HEAD/tests/codegen-llvm/pgo-instrumentation.rs ## Additional information diff --git a/src/rustdoc-internals.md b/src/rustdoc-internals.md index 4affbafe4..55b08e889 100644 --- a/src/rustdoc-internals.md +++ b/src/rustdoc-internals.md @@ -3,7 +3,7 @@ This page describes [`rustdoc`]'s passes and modes. For an overview of `rustdoc`, see the ["Rustdoc overview" chapter](./rustdoc.md). -[`rustdoc`]: https://github.com/rust-lang/rust/tree/master/src/tools/rustdoc +[`rustdoc`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/rustdoc ## From Crate to Clean @@ -72,8 +72,8 @@ which describe the publicly-documentable items in the target crate. [`Attributes`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/clean/types/struct.Attributes.html [`clean_doc_module`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/clean/fn.clean_doc_module.html [`clean::types::Crate`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/clean/types/struct.Crate.html -[`clean/mod.rs`]: https://github.com/rust-lang/rust/blob/master/src/librustdoc/clean/mod.rs -[`core.rs`]: https://github.com/rust-lang/rust/blob/master/src/librustdoc/core.rs +[`clean/mod.rs`]: https://github.com/rust-lang/rust/blob/HEAD/src/librustdoc/clean/mod.rs +[`core.rs`]: https://github.com/rust-lang/rust/blob/HEAD/src/librustdoc/core.rs [`Item`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/clean/types/struct.Item.html [`run_global_ctxt`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/core/fn.run_global_ctxt.html [`rustc_hir::Crate`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.Crate.html @@ -150,7 +150,7 @@ There is also a [`stripper`] module in `librustdoc/passes`, but it is a collection of utility functions for the `strip-*` passes and is not a pass itself. -[`librustdoc/passes`]: https://github.com/rust-lang/rust/tree/master/src/librustdoc/passes +[`librustdoc/passes`]: https://github.com/rust-lang/rust/tree/HEAD/src/librustdoc/passes [`stripper`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/passes/stripper/index.html ## From Clean To HTML @@ -193,13 +193,13 @@ the test-runner code can find all the `doctest`s in the crate. [`find_codes`]: https://doc.rust-lang.org/nightly/nightly-rustc/src/rustdoc/html/markdown.rs.html#749-818 [`formats::renderer::run_format`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/formats/renderer/fn.run_format.html -[`html/format.rs`]: https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/format.rs -[`html/layout.rs`]: https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/layout.rs -[`html/markdown.rs`]: https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/markdown.rs -[`html/render/mod.rs`]: https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/render/mod.rs -[`html/render/print_item.rs`]: https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/render/print_item.rs -[`librustdoc/formats`]: https://github.com/rust-lang/rust/tree/master/src/librustdoc/formats -[`librustdoc/html`]: https://github.com/rust-lang/rust/tree/master/src/librustdoc/html +[`html/format.rs`]: https://github.com/rust-lang/rust/blob/HEAD/src/librustdoc/html/format.rs +[`html/layout.rs`]: https://github.com/rust-lang/rust/blob/HEAD/src/librustdoc/html/layout.rs +[`html/markdown.rs`]: https://github.com/rust-lang/rust/blob/HEAD/src/librustdoc/html/markdown.rs +[`html/render/mod.rs`]: https://github.com/rust-lang/rust/blob/HEAD/src/librustdoc/html/render/mod.rs +[`html/render/print_item.rs`]: https://github.com/rust-lang/rust/blob/HEAD/src/librustdoc/html/render/print_item.rs +[`librustdoc/formats`]: https://github.com/rust-lang/rust/tree/HEAD/src/librustdoc/formats +[`librustdoc/html`]: https://github.com/rust-lang/rust/tree/HEAD/src/librustdoc/html [`print_item`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/html/render/print_item/fn.print_item.html [Askama]: https://docs.rs/askama/latest/askama/ diff --git a/src/rustdoc-internals/rustdoc-gui-test-suite.md b/src/rustdoc-internals/rustdoc-gui-test-suite.md index e155f960e..419f03d02 100644 --- a/src/rustdoc-internals/rustdoc-gui-test-suite.md +++ b/src/rustdoc-internals/rustdoc-gui-test-suite.md @@ -10,5 +10,5 @@ These use a NodeJS-based tool called [`browser-UI-test`] that uses [puppeteer] t [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 +[rustdoc-gui-readme]: https://github.com/rust-lang/rust/blob/HEAD/tests/rustdoc-gui/README.md [goml-script]: https://github.com/GuillaumeGomez/browser-UI-test/blob/master/goml-script.md diff --git a/src/rustdoc-internals/rustdoc-json-test-suite.md b/src/rustdoc-internals/rustdoc-json-test-suite.md index 10e9452ed..e19a8204a 100644 --- a/src/rustdoc-internals/rustdoc-json-test-suite.md +++ b/src/rustdoc-internals/rustdoc-json-test-suite.md @@ -73,11 +73,11 @@ To use the `@ is` with a `` of `$.index[?(@.docs == "foo")].some.field` an it needs to be a JSON string value. [json output]: https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#json-output -[jsondocck]: https://github.com/rust-lang/rust/tree/master/src/tools/jsondocck -[jsondoclint]: https://github.com/rust-lang/rust/tree/master/src/tools/jsondoclint +[jsondocck]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/jsondocck +[jsondoclint]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/jsondoclint [aux-build]: ../tests/compiletest.md#building-auxiliary-crates [`Id`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc_json_types/struct.Id.html [document private items]: https://doc.rust-lang.org/nightly/rustdoc/command-line-arguments.html#--document-private-items-show-items-that-are-not-public -[`directive.rs`]: https://github.com/rust-lang/rust/blob/master/src/tools/jsondocck/src/directive.rs +[`directive.rs`]: https://github.com/rust-lang/rust/blob/HEAD/src/tools/jsondocck/src/directive.rs [shlex]: https://docs.rs/shlex/1.3.0/shlex/index.html [JSONPath]: https://www.rfc-editor.org/rfc/rfc9535.html diff --git a/src/rustdoc-internals/rustdoc-test-suite.md b/src/rustdoc-internals/rustdoc-test-suite.md index 3ec5ebd79..9516968df 100644 --- a/src/rustdoc-internals/rustdoc-test-suite.md +++ b/src/rustdoc-internals/rustdoc-test-suite.md @@ -14,7 +14,7 @@ Internally, [`compiletest`] invokes the supplementary checker script [`htmldocck [Rustdoc test suites]: ../tests/compiletest.md#rustdoc-test-suites [`compiletest`]: ../tests/compiletest.md -[`htmldocck.py`]: https://github.com/rust-lang/rust/blob/master/src/etc/htmldocck.py +[`htmldocck.py`]: https://github.com/rust-lang/rust/blob/HEAD/src/etc/htmldocck.py ## HtmlDocCk Directives diff --git a/src/rustdoc-internals/search.md b/src/rustdoc-internals/search.md index 9cf59ea0c..e88d2703e 100644 --- a/src/rustdoc-internals/search.md +++ b/src/rustdoc-internals/search.md @@ -467,7 +467,7 @@ want the libs team to be able to add new items without causing unrelated tests to fail, but standalone tests will use it more often. The `ResultsTable` and `ParsedQuery` types are specified in -[`rustdoc.d.ts`](https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/static/js/rustdoc.d.ts). +[`rustdoc.d.ts`](https://github.com/rust-lang/rust/blob/HEAD/src/librustdoc/html/static/js/rustdoc.d.ts). For example, imagine we needed to fix a bug where a function named `constructor` couldn't be found. To do this, write two files: diff --git a/src/rustdoc.md b/src/rustdoc.md index b021f58ed..7901e9511 100644 --- a/src/rustdoc.md +++ b/src/rustdoc.md @@ -19,7 +19,7 @@ and [queries] are discussed in the linked chapters. [HIR]: ./hir.md [queries]: ./query.md -[rd]: https://github.com/rust-lang/rust/tree/master/src/librustdoc +[rd]: https://github.com/rust-lang/rust/tree/HEAD/src/librustdoc `librustdoc` performs two major steps after that to render a set of documentation: @@ -35,7 +35,7 @@ lots of details, but that's the high-level overview. using the project in [`src/tools/rustdoc`][bin]. Note that literally all that does is call the `main()` that's in this crate's `lib.rs`, though.) -[bin]: https://github.com/rust-lang/rust/tree/master/src/tools/rustdoc +[bin]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/rustdoc ## Cheat sheet diff --git a/src/sanitizers.md b/src/sanitizers.md index 34c78d4d9..fd91fdb25 100644 --- a/src/sanitizers.md +++ b/src/sanitizers.md @@ -85,8 +85,8 @@ sanitizer. When sanitizer is unsupported on given target, sanitizers tests will be ignored. This behaviour is controlled by compiletest `needs-sanitizer-*` directives. -[test-cg]: https://github.com/rust-lang/rust/tree/master/tests/codegen-llvm -[test-ui]: https://github.com/rust-lang/rust/tree/master/tests/ui/sanitizer +[test-cg]: https://github.com/rust-lang/rust/tree/HEAD/tests/codegen-llvm +[test-ui]: https://github.com/rust-lang/rust/tree/HEAD/tests/ui/sanitizer ## Enabling sanitizer on a new target diff --git a/src/serialization.md b/src/serialization.md index 702d3cfa6..a6c2ee17a 100644 --- a/src/serialization.md +++ b/src/serialization.md @@ -137,11 +137,11 @@ and `Encodable`. [`MetadataDecodable`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_macros/derive.MetadataDecodable.html [`MetadataEncodable`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_macros/derive.MetadataEncodable.html -[`rustc_macros`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_macros +[`rustc_macros`]: https://github.com/rust-lang/rust/tree/HEAD/compiler/rustc_macros [`rustc_metadata::rmeta::`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/rmeta/index.html [`rustc_metadata::rmeta::decoder::DecodeContext`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/rmeta/decoder/struct.DecodeContext.html [`rustc_metadata::rmeta::encoder::EncodeContext`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/rmeta/encoder/struct.EncodeContext.html -[`rustc_middle`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_middle +[`rustc_middle`]: https://github.com/rust-lang/rust/tree/HEAD/compiler/rustc_middle ## Shorthands diff --git a/src/solve/opaque-types.md b/src/solve/opaque-types.md index 8880962d6..ac038e354 100644 --- a/src/solve/opaque-types.md +++ b/src/solve/opaque-types.md @@ -56,7 +56,7 @@ Finally, we check whether the item bounds of the opaque hold for the expected ty [source][item-bounds-ck]. [norm]: https://github.com/rust-lang/rust/blob/384d26fc7e3bdd7687cc17b2662b091f6017ec2a/compiler/rustc_trait_selection/src/solve/normalizes_to/opaque_types.rs#L13 -[coherence-example]: https://github.com/rust-lang/rust/blob/master/tests/ui/type-alias-impl-trait/coherence/coherence_different_hidden_ty.rs +[coherence-example]: https://github.com/rust-lang/rust/blob/HEAD/tests/ui/type-alias-impl-trait/coherence/coherence_different_hidden_ty.rs [placeholder-ck]: https://github.com/rust-lang/rust/blob/384d26fc7e3bdd7687cc17b2662b091f6017ec2a/compiler/rustc_trait_selection/src/solve/normalizes_to/opaque_types.rs#L33 [check-storage]: https://github.com/rust-lang/rust/blob/384d26fc7e3bdd7687cc17b2662b091f6017ec2a/compiler/rustc_trait_selection/src/solve/normalizes_to/opaque_types.rs#L51-L52 [eq-prev]: https://github.com/rust-lang/rust/blob/384d26fc7e3bdd7687cc17b2662b091f6017ec2a/compiler/rustc_trait_selection/src/solve/normalizes_to/opaque_types.rs#L51-L59 diff --git a/src/solve/significant-changes.md b/src/solve/significant-changes.md index eac8f0318..cedd9887d 100644 --- a/src/solve/significant-changes.md +++ b/src/solve/significant-changes.md @@ -60,7 +60,7 @@ As the new implementation has to be able to eagerly handle nested goals for candidate selection, always doing so reduces complexity. It may also enable us to merge more candidates in the future. -[eval-nested]: https://github.com/rust-lang/rust/blob/master/compiler/rustc_trait_selection/src/traits/select/mod.rs#L1271-L1277 +[eval-nested]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_trait_selection/src/traits/select/mod.rs#L1271-L1277 [fulfill-nested]: https://github.com/rust-lang/rust/blob/df8ac8f1d74cffb96a93ae702d16e224f5b9ee8c/compiler/rustc_trait_selection/src/traits/fulfill.rs#L708-L712 ### Nested goals are evaluated until reaching a fixpoint diff --git a/src/stabilization_guide.md b/src/stabilization_guide.md index 7b9e1eb56..c4b265ba0 100644 --- a/src/stabilization_guide.md +++ b/src/stabilization_guide.md @@ -104,17 +104,17 @@ if something { /* XXX */ } [rust-lang/rust#32409]: https://github.com/rust-lang/rust/issues/32409 [std-guide-stabilization]: https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html -[src-version]: https://github.com/rust-lang/rust/blob/master/src/version +[src-version]: https://github.com/rust-lang/rust/blob/HEAD/src/version [forge-versions]: https://forge.rust-lang.org/#current-release-versions [forge-release-process]: https://forge.rust-lang.org/release/process.html [`compiler/rustc_feature`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_feature/index.html -[`compiler/rustc_feature/src/accepted.rs`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_feature/src/accepted.rs -[`compiler/rustc_feature/src/unstable.rs`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_feature/src/unstable.rs +[`compiler/rustc_feature/src/accepted.rs`]: https://github.com/rust-lang/rust/tree/HEAD/compiler/rustc_feature/src/accepted.rs +[`compiler/rustc_feature/src/unstable.rs`]: https://github.com/rust-lang/rust/tree/HEAD/compiler/rustc_feature/src/unstable.rs [The Reference]: https://github.com/rust-lang/reference [The Book]: https://github.com/rust-lang/book [Rust by Example]: https://github.com/rust-lang/rust-by-example [`Unstable Book`]: https://doc.rust-lang.org/unstable-book/index.html -[`src/doc/unstable-book`]: https://github.com/rust-lang/rust/tree/master/src/doc/unstable-book +[`src/doc/unstable-book`]: https://github.com/rust-lang/rust/tree/HEAD/src/doc/unstable-book ## Team nominations diff --git a/src/test-implementation.md b/src/test-implementation.md index f09d73631..14a66e002 100644 --- a/src/test-implementation.md +++ b/src/test-implementation.md @@ -157,7 +157,7 @@ $ rustc my_mod.rs -Z unpretty=hir [`TestDesc`]: https://doc.rust-lang.org/test/struct.TestDesc.html [ast]: ./ast-validation.md [Ident]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/symbol/struct.Ident.html -[rustc_ast]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_ast +[rustc_ast]: https://github.com/rust-lang/rust/tree/HEAD/compiler/rustc_ast [Symbol]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/symbol/struct.Symbol.html [test]: https://doc.rust-lang.org/test/index.html [tdaf]: https://doc.rust-lang.org/test/struct.TestDescAndFn.html diff --git a/src/tests/adding.md b/src/tests/adding.md index 46b8a1e4c..b02d8a0f0 100644 --- a/src/tests/adding.md +++ b/src/tests/adding.md @@ -39,7 +39,7 @@ to work with that stand the test of time (i.e. if a test fails or need to be modified several years later, how can we make it easier for them?). [compiletest]: compiletest.md -[`tests/ui`]: https://github.com/rust-lang/rust/tree/master/tests/ui/ +[`tests/ui`]: https://github.com/rust-lang/rust/tree/HEAD/tests/ui/ ## UI test walkthrough diff --git a/src/tests/ci.md b/src/tests/ci.md index 6c0b5c2e8..a36f8ab0a 100644 --- a/src/tests/ci.md +++ b/src/tests/ci.md @@ -333,7 +333,7 @@ platform. These builders are running on a special pool of builders set up and maintained for us by GitHub. -[Docker container]: https://github.com/rust-lang/rust/tree/master/src/ci/docker +[Docker container]: https://github.com/rust-lang/rust/tree/HEAD/src/ci/docker ## Caching @@ -460,11 +460,11 @@ this: 5. All of the build settings are listed on the line with the text, `build.configure-args` [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/citool`]: https://github.com/rust-lang/rust/blob/master/src/ci/citool +[`jobs.yml`]: https://github.com/rust-lang/rust/blob/HEAD/src/ci/github-actions/jobs.yml +[`.github/workflows/ci.yml`]: https://github.com/rust-lang/rust/blob/HEAD/.github/workflows/ci.yml +[`src/ci/citool`]: https://github.com/rust-lang/rust/blob/HEAD/src/ci/citool [bors]: https://github.com/bors [homu]: https://github.com/rust-lang/homu [merge queue]: https://bors.rust-lang.org/queue/rust -[dist-x86_64-linux]: https://github.com/rust-lang/rust/blob/master/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile +[dist-x86_64-linux]: https://github.com/rust-lang/rust/blob/HEAD/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile [the GitHub Actions workflows page]: https://github.com/rust-lang/rust/actions diff --git a/src/tests/compiletest.md b/src/tests/compiletest.md index 0234b394c..c2aee82bd 100644 --- a/src/tests/compiletest.md +++ b/src/tests/compiletest.md @@ -54,8 +54,8 @@ incremental compilation. The various suites are defined in The following test suites are available, with links for more information: -[`tests`]: https://github.com/rust-lang/rust/blob/master/tests -[`src/tools/compiletest/src/common.rs`]: https://github.com/rust-lang/rust/tree/master/src/tools/compiletest/src/common.rs +[`tests`]: https://github.com/rust-lang/rust/blob/HEAD/tests +[`src/tools/compiletest/src/common.rs`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/compiletest/src/common.rs ### Compiler-specific test suites @@ -135,7 +135,7 @@ The directives for pretty-printing tests are: of the two pretty-printing rounds will be compared to ensure that the pretty-printed output converges to a steady state. -[`tests/pretty`]: https://github.com/rust-lang/rust/tree/master/tests/pretty +[`tests/pretty`]: https://github.com/rust-lang/rust/tree/HEAD/tests/pretty ### Incremental tests @@ -187,7 +187,7 @@ still pass. cause an Internal Compiler Error (ICE). This is a highly specialized directive to check that the incremental cache continues to work after an ICE. -[`tests/incremental`]: https://github.com/rust-lang/rust/tree/master/tests/incremental +[`tests/incremental`]: https://github.com/rust-lang/rust/tree/HEAD/tests/incremental ### Debuginfo tests @@ -272,7 +272,7 @@ For example, `./x test tests/debuginfo -- --debugger gdb` will only test GDB com > > Otherwise the lldb debuginfo tests can produce crashes in mysterious ways. -[`tests/debuginfo`]: https://github.com/rust-lang/rust/tree/master/tests/debuginfo +[`tests/debuginfo`]: https://github.com/rust-lang/rust/tree/HEAD/tests/debuginfo > **Note on acquiring `cdb.exe` on Windows 11** > @@ -299,7 +299,7 @@ See also the [assembly tests](#assembly-tests) for a similar set of tests. If you need to work with `#![no_std]` cross-compiling tests, consult the [`minicore` test auxiliary](./minicore.md) chapter. -[`tests/codegen-llvm`]: https://github.com/rust-lang/rust/tree/master/tests/codegen-llvm +[`tests/codegen-llvm`]: https://github.com/rust-lang/rust/tree/HEAD/tests/codegen-llvm [FileCheck]: https://llvm.org/docs/CommandGuide/FileCheck.html @@ -322,7 +322,7 @@ See also the [codegen tests](#codegen-tests) for a similar set of tests. If you need to work with `#![no_std]` cross-compiling tests, consult the [`minicore` test auxiliary](./minicore.md) chapter. -[`tests/assembly-llvm`]: https://github.com/rust-lang/rust/tree/master/tests/assembly-llvm +[`tests/assembly-llvm`]: https://github.com/rust-lang/rust/tree/HEAD/tests/assembly-llvm ### Codegen-units tests @@ -343,7 +343,7 @@ where `cgu` is a space separated list of the CGU names and the linkage information in brackets. For example: `//~ MONO_ITEM static function::FOO @@ statics[Internal]` -[`tests/codegen-units`]: https://github.com/rust-lang/rust/tree/master/tests/codegen-units +[`tests/codegen-units`]: https://github.com/rust-lang/rust/tree/HEAD/tests/codegen-units ### Mir-opt tests @@ -392,7 +392,7 @@ problematic in the presence of pointers in constants or other bit width dependent things. In that case you can add `// EMIT_MIR_FOR_EACH_BIT_WIDTH` to your test, causing separate files to be generated for 32bit and 64bit systems. -[`tests/mir-opt`]: https://github.com/rust-lang/rust/tree/master/tests/mir-opt +[`tests/mir-opt`]: https://github.com/rust-lang/rust/tree/HEAD/tests/mir-opt ### `run-make` tests @@ -481,9 +481,9 @@ 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 +[`tests/run-make`]: https://github.com/rust-lang/rust/tree/HEAD/tests/run-make +[`tests/run-make-cargo`]: https://github.com/rust-lang/rust/tree/HEAD/tests/run-make-cargo +[`run_make_support`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/run-make-support ### Coverage tests @@ -553,9 +553,9 @@ The tests in [`tests/coverage-run-rustdoc`] also run instrumented doctests and include them in the coverage report. This avoids having to build rustdoc when only running the main `coverage` suite. -[`tests/coverage`]: https://github.com/rust-lang/rust/tree/master/tests/coverage -[`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 +[`tests/coverage`]: https://github.com/rust-lang/rust/tree/HEAD/tests/coverage +[`src/tools/coverage-dump`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/coverage-dump +[`tests/coverage-run-rustdoc`]: https://github.com/rust-lang/rust/tree/HEAD/tests/coverage-run-rustdoc ### Crash tests @@ -602,7 +602,7 @@ Make sure that your fix actually fixes the root cause of the issue and not just a subset first. The issue numbers can be found in the file name or the `//@ known-bug` directive inside the test file. -[`tests/crashes`]: https://github.com/rust-lang/rust/tree/master/tests/crashes +[`tests/crashes`]: https://github.com/rust-lang/rust/tree/HEAD/tests/crashes ["untracked" crashes]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+state%3Aopen+label%3AI-ICE%2CI-crash+label%3AT-compiler+label%3AS-has-mcve+-label%3AS-bug-has-test [labeling]: https://forge.rust-lang.org/release/issue-triaging.html#applying-and-removing-labels diff --git a/src/tests/directives.md b/src/tests/directives.md index 045c8c71f..b6273c66d 100644 --- a/src/tests/directives.md +++ b/src/tests/directives.md @@ -38,7 +38,7 @@ sections that describe the command in more detail if available. This list may not be exhaustive. Directives can generally be found by browsing the `TestProps` structure found in [`directives.rs`] from the compiletest source. -[`directives.rs`]: https://github.com/rust-lang/rust/tree/master/src/tools/compiletest/src/directives.rs +[`directives.rs`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/compiletest/src/directives.rs ### Assembly @@ -385,7 +385,7 @@ described below: - Example: `x86_64-unknown-linux-gnu` See -[`tests/ui/argfile/commandline-argfile.rs`](https://github.com/rust-lang/rust/blob/master/tests/ui/argfile/commandline-argfile.rs) +[`tests/ui/argfile/commandline-argfile.rs`](https://github.com/rust-lang/rust/blob/HEAD/tests/ui/argfile/commandline-argfile.rs) for an example of a test that uses this substitution. [output normalization]: ui.md#normalization @@ -534,6 +534,6 @@ example, `//@ failure-status: 1`, `self.props.failure_status` will evaluate to 1, as `parse_failure_status()` will have overridden the `TestProps` default value, for that test specifically. -[`src/tools/compiletest/src/directives.rs`]: https://github.com/rust-lang/rust/tree/master/src/tools/compiletest/src/directives.rs -[`src/tools/compiletest/src/common.rs`]: https://github.com/rust-lang/rust/tree/master/src/tools/compiletest/src/common.rs -[`src/tools/compiletest/src/runtest.rs`]: https://github.com/rust-lang/rust/tree/master/src/tools/compiletest/src/runtest.rs +[`src/tools/compiletest/src/directives.rs`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/compiletest/src/directives.rs +[`src/tools/compiletest/src/common.rs`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/compiletest/src/common.rs +[`src/tools/compiletest/src/runtest.rs`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/compiletest/src/runtest.rs diff --git a/src/tests/docker.md b/src/tests/docker.md index ae0939842..af8e0c36d 100644 --- a/src/tests/docker.md +++ b/src/tests/docker.md @@ -54,7 +54,7 @@ Some additional notes about using the interactive mode: /bin/bash` where `` is the container name like `4ba195e95cef`. [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 -[`src/ci/run.sh`]: https://github.com/rust-lang/rust/blob/master/src/ci/run.sh -[`enable-docker-ipv6.sh`]: https://github.com/rust-lang/rust/blob/master/src/ci/scripts/enable-docker-ipv6.sh +[`src/ci/docker`]: https://github.com/rust-lang/rust/tree/HEAD/src/ci/docker +[`src/ci/docker/run.sh`]: https://github.com/rust-lang/rust/blob/HEAD/src/ci/docker/run.sh +[`src/ci/run.sh`]: https://github.com/rust-lang/rust/blob/HEAD/src/ci/run.sh +[`enable-docker-ipv6.sh`]: https://github.com/rust-lang/rust/blob/HEAD/src/ci/scripts/enable-docker-ipv6.sh diff --git a/src/tests/intro.md b/src/tests/intro.md index 4fa63b83b..c13f8bde2 100644 --- a/src/tests/intro.md +++ b/src/tests/intro.md @@ -24,7 +24,7 @@ The [Compiletest chapter][compiletest] goes into detail on how to use this tool. > Example: `./x test tests/ui` [compiletest]: compiletest.md -[`tests`]: https://github.com/rust-lang/rust/tree/master/tests +[`tests`]: https://github.com/rust-lang/rust/tree/HEAD/tests ### Package tests @@ -64,7 +64,7 @@ package tests: * `--doc` — Only runs documentation tests in the package. * `--no-doc` — Run all tests *except* documentation tests. -[tidy-unit-tests]: https://github.com/rust-lang/rust/blob/master/src/tools/tidy/src/unit_tests.rs +[tidy-unit-tests]: https://github.com/rust-lang/rust/blob/HEAD/src/tools/tidy/src/unit_tests.rs ### Tidy @@ -74,7 +74,7 @@ conventions, such as rejecting long lines. There is more information in the > Examples: `./x test tidy` -[Tidy Readme]: https://github.com/rust-lang/rust/blob/master/src/tools/tidy/Readme.md +[Tidy Readme]: https://github.com/rust-lang/rust/blob/HEAD/src/tools/tidy/Readme.md ### Formatting @@ -142,7 +142,7 @@ In CI, some tools are allowed to fail. Failures send notifications to the corresponding teams, and is tracked on the [toolstate website]. More information can be found in the [toolstate documentation]. -[`src/tools`]: https://github.com/rust-lang/rust/tree/master/src/tools/ +[`src/tools`]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/ [toolstate documentation]: https://forge.rust-lang.org/infra/toolstate.html [toolstate website]: https://rust-lang-nursery.github.io/rust-toolstate/ diff --git a/src/tests/minicore.md b/src/tests/minicore.md index 23b772790..f33c2439c 100644 --- a/src/tests/minicore.md +++ b/src/tests/minicore.md @@ -71,4 +71,4 @@ impl Copy for Meow {} // `Copy` here is provided by `minicore` fn meow() {} ``` -[`minicore`]: https://github.com/rust-lang/rust/tree/master/tests/auxiliary/minicore.rs +[`minicore`]: https://github.com/rust-lang/rust/tree/HEAD/tests/auxiliary/minicore.rs diff --git a/src/tests/running.md b/src/tests/running.md index 5c1d66768..0a99c847c 100644 --- a/src/tests/running.md +++ b/src/tests/running.md @@ -368,11 +368,11 @@ export TEST_DEVICE_ADDR="127.0.0.1:12345" # FIXME(madsmtm): Allow debuginfo tests to work (maybe needs `.dSYM` folder to be copied to the target?). ``` -[armhf-gnu]: https://github.com/rust-lang/rust/tree/master/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile +[armhf-gnu]: https://github.com/rust-lang/rust/tree/HEAD/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile [QEMU]: https://www.qemu.org/ -[remote-test-client]: https://github.com/rust-lang/rust/tree/master/src/tools/remote-test-client -[remote-test-server]: https://github.com/rust-lang/rust/tree/master/src/tools/remote-test-server -[src/bootstrap/src/core/build_steps/test.rs]: https://github.com/rust-lang/rust/blob/master/src/bootstrap/src/core/build_steps/test.rs +[remote-test-client]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/remote-test-client +[remote-test-server]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/remote-test-server +[src/bootstrap/src/core/build_steps/test.rs]: https://github.com/rust-lang/rust/blob/HEAD/src/bootstrap/src/core/build_steps/test.rs ## Testing tests on wasi (wasm32-wasip1) @@ -393,7 +393,7 @@ In my case I git-cloned it next to my rust folder, so it was `../wasi-sdk/build/ Now, tests should just run, you don't have to set up anything else. [wasi sdk repository]: https://github.com/WebAssembly/wasi-sdk -[wasm32-wasip1 target support page]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/wasm32-wasip1.md#building-the-target. +[wasm32-wasip1 target support page]: https://github.com/rust-lang/rust/blob/HEAD/src/doc/rustc/src/platform-support/wasm32-wasip1.md#building-the-target. -[`tests/ui`]: https://github.com/rust-lang/rust/tree/master/tests/ui +[`tests/ui`]: https://github.com/rust-lang/rust/tree/HEAD/tests/ui diff --git a/src/tests/ui.md b/src/tests/ui.md index d3a2c4064..497e61094 100644 --- a/src/tests/ui.md +++ b/src/tests/ui.md @@ -12,14 +12,14 @@ the resulting program](#controlling-passfail-expectations) to verify its behavior. For a survey of each subdirectory's purpose under `tests/ui`, consult the -[SUMMARY.md](https://github.com/rust-lang/rust/tree/master/tests/ui/SUMMARY.md). +[SUMMARY.md](https://github.com/rust-lang/rust/tree/HEAD/tests/ui/SUMMARY.md). This is useful if you write a new test, and are looking for a category to place it in. If you need to work with `#![no_std]` cross-compiling tests, consult the [`minicore` test auxiliary](./minicore.md) chapter. -[`tests/ui`]: https://github.com/rust-lang/rust/blob/master/tests/ui +[`tests/ui`]: https://github.com/rust-lang/rust/blob/HEAD/tests/ui ## General structure of a test @@ -174,8 +174,8 @@ The corresponding reference file will use the normalized output to test both Please see [`ui/transmute/main.rs`][mrs] and [`main.stderr`] for a concrete usage example. -[mrs]: https://github.com/rust-lang/rust/blob/master/tests/ui/transmute/main.rs -[`main.stderr`]: https://github.com/rust-lang/rust/blob/master/tests/ui/transmute/main.stderr +[mrs]: https://github.com/rust-lang/rust/blob/HEAD/tests/ui/transmute/main.rs +[`main.stderr`]: https://github.com/rust-lang/rust/blob/HEAD/tests/ui/transmute/main.stderr ## Error annotations @@ -548,7 +548,7 @@ For example, if your test is related to closures, you should put it in `tests/ui/closures`. When you reach the limit, you could increase it by tweaking [here][ui test tidy]. -[ui test tidy]: https://github.com/rust-lang/rust/blob/master/src/tools/tidy/src/ui_tests.rs +[ui test tidy]: https://github.com/rust-lang/rust/blob/HEAD/src/tools/tidy/src/ui_tests.rs ## Rustfix tests diff --git a/src/tracing.md b/src/tracing.md index a7cdab73e..4d52f9c86 100644 --- a/src/tracing.md +++ b/src/tracing.md @@ -80,7 +80,7 @@ RUSTC_LOG=[typeck{key=.*name_of_item.*}] Different queries have different arguments. You can find a list of queries and their arguments in -[`rustc_middle/src/query/mod.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_middle/src/query/mod.rs#L18). +[`rustc_middle/src/query/mod.rs`](https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_middle/src/query/mod.rs#L18). ## Broad module level filters diff --git a/src/traits/chalk.md b/src/traits/chalk.md index ca5ed5259..d0abe423e 100644 --- a/src/traits/chalk.md +++ b/src/traits/chalk.md @@ -38,4 +38,4 @@ implementing them in rustc. We map our struct, trait, and impl declarations into logical inference rules in the lowering module in rustc. [chalk]: https://github.com/rust-lang/chalk -[rustc_traits]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_traits +[rustc_traits]: https://github.com/rust-lang/rust/tree/HEAD/compiler/rustc_traits diff --git a/src/traits/goals-and-clauses.md b/src/traits/goals-and-clauses.md index 2884ca5a0..9dbb62a7e 100644 --- a/src/traits/goals-and-clauses.md +++ b/src/traits/goals-and-clauses.md @@ -42,7 +42,7 @@ In terms of code, these types are defined in [`chalk-ir/src/lib.rs`][chalk_ir] in chalk. [pphhf]: https://rust-lang.github.io/chalk/book/bibliography.html#pphhf -[traits_mod]: https://github.com/rust-lang/rust/blob/master/compiler/rustc_middle/src/traits/mod.rs +[traits_mod]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_middle/src/traits/mod.rs [chalk_ir]: https://github.com/rust-lang/chalk/blob/master/chalk-ir/src/lib.rs diff --git a/src/ty-fold.md b/src/ty-fold.md index 23253022f..120a266e3 100644 --- a/src/ty-fold.md +++ b/src/ty-fold.md @@ -104,7 +104,7 @@ and all that does is index into the list of substitutions with the index of the [`TypeFolder`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/trait.TypeFolder.html [`fold_ty`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/trait.TypeFolder.html#method.fold_ty [`ArgFolder`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/binder/struct.ArgFolder.html -[here]: https://github.com/rust-lang/rust/blob/master/compiler/rustc_macros/src/type_foldable.rs +[here]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_macros/src/type_foldable.rs [actual folder]: https://github.com/rust-lang/rust/blob/75ff3110ac6d8a0259023b83fd20d7ab295f8dd6/src/librustc_middle/ty/subst.rs#L440-L451 [fold_ty]: https://github.com/rust-lang/rust/blob/75ff3110ac6d8a0259023b83fd20d7ab295f8dd6/src/librustc_middle/ty/subst.rs#L512-L536 [ty_for_param]: https://github.com/rust-lang/rust/blob/75ff3110ac6d8a0259023b83fd20d7ab295f8dd6/src/librustc_middle/ty/subst.rs#L552-L587 diff --git a/src/unsafety-checking.md b/src/unsafety-checking.md index fbc19d896..ed05f8a4c 100644 --- a/src/unsafety-checking.md +++ b/src/unsafety-checking.md @@ -75,4 +75,4 @@ the ast that searches for unsafe blocks, functions and implementations, as well as certain unsafe attributes. [Unsafe traits]: https://doc.rust-lang.org/reference/items/traits.html#unsafe-traits -[coherence]: https://github.com/rust-lang/rust/blob/master/compiler/rustc_hir_analysis/src/coherence/unsafety.rs +[coherence]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_hir_analysis/src/coherence/unsafety.rs diff --git a/src/walkthrough.md b/src/walkthrough.md index b4c337934..d050f9dad 100644 --- a/src/walkthrough.md +++ b/src/walkthrough.md @@ -271,4 +271,4 @@ about the feature. Steps to stabilize the feature can be found at [Stabilizing Features](./stabilization_guide.md). -[relnotes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md +[relnotes]: https://github.com/rust-lang/rust/blob/HEAD/RELEASES.md From 7e04ffcb7c91d6d95842cbd3533b7caf83f5f3e6 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 30 Oct 2025 17:24:55 +0100 Subject: [PATCH 4/5] compiletest: rename add-core-stubs to add-minicore --- src/tests/minicore.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/tests/minicore.md b/src/tests/minicore.md index 23b772790..7d71efdd1 100644 --- a/src/tests/minicore.md +++ b/src/tests/minicore.md @@ -14,21 +14,21 @@ range of tests. -A test can use [`minicore`] by specifying the `//@ add-core-stubs` directive. -Then, mark the test with `#![feature(no_core)]` + `#![no_std]` + `#![no_core]`. -Due to Edition 2015 extern prelude rules, you will probably need to declare -`minicore` as an extern crate. +A test can use [`minicore`] by specifying the `//@ add-minicore` directive. +Then, mark the test with `#![feature(no_core)]` + `#![no_std]` + `#![no_core]`, +and import the crate into the test with `extern crate minicore` (edition 2015) +or `use minicore` (edition 2018+). ## Implied compiler flags -Due to the `no_std` + `no_core` nature of these tests, `//@ add-core-stubs` +Due to the `no_std` + `no_core` nature of these tests, `//@ add-minicore` implies and requires that the test will be built with `-C panic=abort`. **Unwinding panics are not supported.** Tests will also be built with `-C force-unwind-tables=yes` to preserve CFI directives in assembly tests. -TL;DR: `//@ add-core-stubs` implies two compiler flags: +TL;DR: `//@ add-minicore` implies two compiler flags: 1. `-C panic=abort` 2. `-C force-unwind-tables=yes` @@ -48,7 +48,7 @@ attributes (e.g. `on_unimplemented`) should be replicated exactly in `minicore`. ## Example codegen test that uses `minicore` ```rust,no_run -//@ add-core-stubs +//@ add-minicore //@ revisions: meow bark //@[meow] compile-flags: --target=x86_64-unknown-linux-gnu //@[meow] needs-llvm-components: x86 From 63578e019706965599d3fed1110856a4d58a418f Mon Sep 17 00:00:00 2001 From: The rustc-josh-sync Cronjob Bot Date: Mon, 3 Nov 2025 04:17:30 +0000 Subject: [PATCH 5/5] Prepare for merging from rust-lang/rust This updates the rust-version file to c5dabe8cf798123087d094f06417f5a767ca73e8. --- rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-version b/rust-version index f100e4116..0e89b4ab6 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -b1b464d6f61ec8c4e609c1328106378c066a9729 +c5dabe8cf798123087d094f06417f5a767ca73e8