Skip to content

Commit 5d13405

Browse files
authored
Merge branch 'rust-lang:master' into patch-2
2 parents ef6ca31 + 5e53d1f commit 5d13405

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1103
-362
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: github.repository == 'rust-lang/rustc-dev-guide'
1515
runs-on: ubuntu-latest
1616
env:
17-
MDBOOK_VERSION: 0.4.21
17+
MDBOOK_VERSION: 0.4.48
1818
MDBOOK_LINKCHECK2_VERSION: 0.9.1
1919
MDBOOK_MERMAID_VERSION: 0.12.6
2020
MDBOOK_TOC_VERSION: 0.11.2

.github/workflows/rustc-pull.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
# Cache the josh directory with checked out rustc
2929
cache-directories: "/home/runner/.cache/rustc-dev-guide-josh"
3030
- name: Install josh
31-
run: RUSTFLAGS="--cap-lints warn" cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
31+
run: RUSTFLAGS="--cap-lints warn" cargo install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
3232
- name: Setup bot git name and email
3333
run: |
3434
git config --global user.name 'The rustc-dev-guide Cronjob Bot'

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ rustdocs][rustdocs].
4343
To build a local static HTML site, install [`mdbook`](https://github.com/rust-lang/mdBook) with:
4444

4545
```
46-
> cargo install mdbook mdbook-linkcheck2 mdbook-toc mdbook-mermaid
46+
cargo install mdbook mdbook-linkcheck2 mdbook-toc mdbook-mermaid
4747
```
4848

4949
and execute the following command in the root of the repository:
5050

5151
```
52-
> mdbook build --open
52+
mdbook build --open
5353
```
5454

5555
The build files are found in the `book/html` directory.
@@ -61,8 +61,8 @@ checking is **not** run by default locally, though it is in CI. To enable it
6161
locally, set the environment variable `ENABLE_LINKCHECK=1` like in the
6262
following example.
6363

64-
```console
65-
$ ENABLE_LINKCHECK=1 mdbook serve
64+
```
65+
ENABLE_LINKCHECK=1 mdbook serve
6666
```
6767

6868
### Table of Contents
@@ -77,7 +77,7 @@ This repository is linked to `rust-lang/rust` as a [josh](https://josh-project.g
7777
You'll need to install `josh-proxy` locally via
7878

7979
```
80-
cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
80+
cargo install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
8181
```
8282
Older versions of `josh-proxy` may not round trip commits losslessly so it is important to install this exact version.
8383

@@ -86,14 +86,14 @@ Older versions of `josh-proxy` may not round trip commits losslessly so it is im
8686
1) Checkout a new branch that will be used to create a PR into `rust-lang/rustc-dev-guide`
8787
2) Run the pull command
8888
```
89-
$ cargo run --manifest-path josh-sync/Cargo.toml rustc-pull
89+
cargo run --manifest-path josh-sync/Cargo.toml rustc-pull
9090
```
9191
3) Push the branch to your fork and create a PR into `rustc-dev-guide`
9292
9393
### Push changes from this repository into `rust-lang/rust`
9494
1) Run the push command to create a branch named `<branch-name>` in a `rustc` fork under the `<gh-username>` account
9595
```
96-
$ cargo run --manifest-path josh-sync/Cargo.toml rustc-push <branch-name> <gh-username>
96+
cargo run --manifest-path josh-sync/Cargo.toml rustc-push <branch-name> <gh-username>
9797
```
9898
2) Create a PR from `<branch-name>` into `rust-lang/rust`
9999
@@ -106,5 +106,5 @@ You may observe "Nothing to pull" even if you *know* rustc-pull has something to
106106
To minimize the likelihood of this happening, you may wish to keep a separate *minimal* git config that *only* has `[user]` entries from global git config, then repoint system git to use the minimal git config instead. E.g.
107107
108108
```
109-
$ GIT_CONFIG_GLOBAL=/path/to/minimal/gitconfig GIT_CONFIG_SYSTEM='' cargo +stable run --manifest-path josh-sync/Cargo.toml -- rustc-pull
109+
GIT_CONFIG_GLOBAL=/path/to/minimal/gitconfig GIT_CONFIG_SYSTEM='' cargo run --manifest-path josh-sync/Cargo.toml -- rustc-pull
110110
```

josh-sync/src/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ impl GitSync {
194194
);
195195
println!(
196196
// Open PR with `subtree update` title to silence the `no-merges` triagebot check
197-
" https://github.com/{UPSTREAM_REPO}/compare/{github_user}:{branch}?quick_pull=1&title=Rustc+dev+guide+subtree+update&body=r?+@ghost"
197+
" https://github.com/{UPSTREAM_REPO}/compare/{github_user}:{branch}?quick_pull=1&title=rustc-dev-guide+subtree+update&body=r?+@ghost"
198198
);
199199

200200
drop(josh);

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
25a615bf829b9f6d6f22da537e3851043f92e5f2
1+
7e552b46af72df390ed233b58a7f51650515b2a8

src/SUMMARY.md

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Summary
22

33
[Getting Started](./getting-started.md)
4+
45
[About this guide](./about-this-guide.md)
56

67
---
@@ -10,9 +11,9 @@
1011
- [How to build and run the compiler](./building/how-to-build-and-run.md)
1112
- [Quickstart](./building/quickstart.md)
1213
- [Prerequisites](./building/prerequisites.md)
13-
- [Suggested Workflows](./building/suggested.md)
14+
- [Suggested workflows](./building/suggested.md)
1415
- [Distribution artifacts](./building/build-install-distribution-artifacts.md)
15-
- [Building Documentation](./building/compiler-documenting.md)
16+
- [Building documentation](./building/compiler-documenting.md)
1617
- [Rustdoc overview](./rustdoc.md)
1718
- [Adding a new target](./building/new-target.md)
1819
- [Optimized build](./building/optimized-build.md)
@@ -42,11 +43,11 @@
4243
- [with the linux perf tool](./profiling/with_perf.md)
4344
- [with Windows Performance Analyzer](./profiling/wpa_profiling.md)
4445
- [with the Rust benchmark suite](./profiling/with_rustc_perf.md)
45-
- [crates.io Dependencies](./crates-io.md)
46+
- [crates.io dependencies](./crates-io.md)
4647

4748
# Contributing to Rust
4849

49-
- [Contribution Procedures](./contributing.md)
50+
- [Contribution procedures](./contributing.md)
5051
- [About the compiler team](./compiler-team.md)
5152
- [Using Git](./git.md)
5253
- [Mastering @rustbot](./rustbot.md)
@@ -56,7 +57,7 @@
5657
- [Stabilizing Features](./stabilization_guide.md)
5758
- [Feature Gates](./feature-gates.md)
5859
- [Coding conventions](./conventions.md)
59-
- [Procedures for Breaking Changes](./bug-fix-procedure.md)
60+
- [Procedures for breaking changes](./bug-fix-procedure.md)
6061
- [Using external repositories](./external-repos.md)
6162
- [Fuzzing](./fuzzing.md)
6263
- [Notification groups](notification-groups/about.md)
@@ -81,36 +82,43 @@
8182
- [How Bootstrap does it](./building/bootstrapping/how-bootstrap-does-it.md)
8283
- [Writing tools in Bootstrap](./building/bootstrapping/writing-tools-in-bootstrap.md)
8384
- [Debugging bootstrap](./building/bootstrapping/debugging-bootstrap.md)
85+
- [cfg(bootstrap) in dependencies](./building/bootstrapping/bootstrap-in-dependencies.md)
8486

8587
# High-level Compiler Architecture
8688

8789
- [Prologue](./part-2-intro.md)
8890
- [Overview of the compiler](./overview.md)
8991
- [The compiler source code](./compiler-src.md)
9092
- [Queries: demand-driven compilation](./query.md)
91-
- [The Query Evaluation Model in Detail](./queries/query-evaluation-model-in-detail.md)
93+
- [The Query Evaluation Model in detail](./queries/query-evaluation-model-in-detail.md)
9294
- [Incremental compilation](./queries/incremental-compilation.md)
93-
- [Incremental compilation In Detail](./queries/incremental-compilation-in-detail.md)
94-
- [Debugging and Testing](./incrcomp-debugging.md)
95+
- [Incremental compilation in detail](./queries/incremental-compilation-in-detail.md)
96+
- [Debugging and testing](./incrcomp-debugging.md)
9597
- [Salsa](./queries/salsa.md)
96-
- [Memory Management in Rustc](./memory.md)
97-
- [Serialization in Rustc](./serialization.md)
98-
- [Parallel Compilation](./parallel-rustc.md)
98+
- [Memory management in rustc](./memory.md)
99+
- [Serialization in rustc](./serialization.md)
100+
- [Parallel compilation](./parallel-rustc.md)
99101
- [Rustdoc internals](./rustdoc-internals.md)
100102
- [Search](./rustdoc-internals/search.md)
101103
- [The `rustdoc` test suite](./rustdoc-internals/rustdoc-test-suite.md)
104+
- [Autodiff internals](./autodiff/internals.md)
105+
- [Installation](./autodiff/installation.md)
106+
- [How to debug](./autodiff/debugging.md)
107+
- [Autodiff flags](./autodiff/flags.md)
108+
- [Current limitations](./autodiff/limitations.md)
109+
102110
# Source Code Representation
103111

104112
- [Prologue](./part-3-intro.md)
105113
- [Syntax and the AST](./syntax-intro.md)
106-
- [Lexing and Parsing](./the-parser.md)
114+
- [Lexing and parsing](./the-parser.md)
107115
- [Macro expansion](./macro-expansion.md)
108116
- [Name resolution](./name-resolution.md)
109117
- [Attributes](./attributes.md)
110-
- [`#[test]` Implementation](./test-implementation.md)
111-
- [Panic Implementation](./panic-implementation.md)
112-
- [AST Validation](./ast-validation.md)
113-
- [Feature Gate Checking](./feature-gate-ck.md)
118+
- [`#[test]` implementation](./test-implementation.md)
119+
- [Panic implementation](./panic-implementation.md)
120+
- [AST validation](./ast-validation.md)
121+
- [Feature gate checking](./feature-gate-ck.md)
114122
- [Lang Items](./lang-items.md)
115123
- [The HIR (High-level IR)](./hir.md)
116124
- [Lowering AST to HIR](./ast-lowering.md)
@@ -129,7 +137,7 @@
129137
- [Example: Type checking](./rustc-driver/interacting-with-the-ast.md)
130138
- [Example: Getting diagnostics](./rustc-driver/getting-diagnostics.md)
131139
- [Remarks on perma-unstable features](./rustc-driver/remarks-on-perma-unstable-features.md)
132-
- [Errors and Lints](diagnostics.md)
140+
- [Errors and lints](diagnostics.md)
133141
- [Diagnostic and subdiagnostic structs](./diagnostics/diagnostic-structs.md)
134142
- [Translation](./diagnostics/translation.md)
135143
- [`LintStore`](./diagnostics/lintstore.md)
@@ -149,6 +157,7 @@
149157
- [ADTs and Generic Arguments](./ty_module/generic_arguments.md)
150158
- [Parameter types/consts/regions](./ty_module/param_ty_const_regions.md)
151159
- [`TypeFolder` and `TypeFoldable`](./ty-fold.md)
160+
- [Aliases and Normalization](./normalization.md)
152161
- [Typing/Param Envs](./typing_parameter_envs.md)
153162
- [Type inference](./type-inference.md)
154163
- [Trait solving](./traits/resolution.md)
@@ -168,21 +177,20 @@
168177
- [Coinduction](./solve/coinduction.md)
169178
- [Caching](./solve/caching.md)
170179
- [Proof trees](./solve/proof-trees.md)
171-
- [Normalization](./solve/normalization.md)
172180
- [Opaque types](./solve/opaque-types.md)
173181
- [Significant changes and quirks](./solve/significant-changes.md)
174182
- [`Unsize` and `CoerceUnsized` traits](./traits/unsize.md)
175183
- [Type checking](./type-checking.md)
176184
- [Method Lookup](./method-lookup.md)
177185
- [Variance](./variance.md)
178-
- [Coherence Checking](./coherence.md)
179-
- [Opaque Types](./opaque-types-type-alias-impl-trait.md)
186+
- [Coherence checking](./coherence.md)
187+
- [Opaque types](./opaque-types-type-alias-impl-trait.md)
180188
- [Inference details](./opaque-types-impl-trait-inference.md)
181189
- [Return Position Impl Trait In Trait](./return-position-impl-trait-in-trait.md)
182190
- [Region inference restrictions][opaque-infer]
183191
- [Const condition checking](./effects.md)
184192
- [Pattern and Exhaustiveness Checking](./pat-exhaustive-checking.md)
185-
- [Unsafety Checking](./unsafety-checking.md)
193+
- [Unsafety checking](./unsafety-checking.md)
186194
- [MIR dataflow](./mir/dataflow.md)
187195
- [Drop elaboration](./mir/drop-elaboration.md)
188196
- [The borrow checker](./borrow_check.md)
@@ -224,9 +232,13 @@
224232
---
225233

226234
[Appendix A: Background topics](./appendix/background.md)
235+
227236
[Appendix B: Glossary](./appendix/glossary.md)
237+
228238
[Appendix C: Code Index](./appendix/code-index.md)
239+
229240
[Appendix D: Compiler Lecture Series](./appendix/compiler-lecture.md)
241+
230242
[Appendix E: Bibliography](./appendix/bibliography.md)
231243

232244
[Appendix Z: HumorRust](./appendix/humorust.md)

src/about-this-guide.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,41 @@
33
This guide is meant to help document how rustc – the Rust compiler – works,
44
as well as to help new contributors get involved in rustc development.
55

6-
There are seven parts to this guide:
6+
There are several parts to this guide:
77

8-
1. [Building `rustc`][p1]:
8+
1. [Building and debugging `rustc`][p1]:
99
Contains information that should be useful no matter how you are contributing,
1010
about building, debugging, profiling, etc.
11-
2. [Contributing to `rustc`][p2]:
11+
1. [Contributing to Rust][p2]:
1212
Contains information that should be useful no matter how you are contributing,
1313
about procedures for contribution, using git and Github, stabilizing features, etc.
14-
3. [High-Level Compiler Architecture][p3]:
14+
1. [Bootstrapping][p3]:
15+
Describes how the Rust compiler builds itself using previous versions, including
16+
an introduction to the bootstrap process and debugging methods.
17+
1. [High-level Compiler Architecture][p4]:
1518
Discusses the high-level architecture of the compiler and stages of the compile process.
16-
4. [Source Code Representation][p4]:
19+
1. [Source Code Representation][p5]:
1720
Describes the process of taking raw source code from the user
1821
and transforming it into various forms that the compiler can work with easily.
19-
5. [Analysis][p5]:
20-
discusses the analyses that the compiler uses to check various properties of the code
22+
1. [Supporting Infrastructure][p6]:
23+
Covers command-line argument conventions, compiler entry points like rustc_driver and
24+
rustc_interface, and the design and implementation of errors and lints.
25+
1. [Analysis][p7]:
26+
Discusses the analyses that the compiler uses to check various properties of the code
2127
and inform later stages of the compile process (e.g., type checking).
22-
6. [From MIR to Binaries][p6]: How linked executable machine code is generated.
23-
7. [Appendices][p7] at the end with useful reference information.
28+
1. [MIR to Binaries][p8]: How linked executable machine code is generated.
29+
1. [Appendices][p9] at the end with useful reference information.
2430
There are a few of these with different information, including a glossary.
2531

2632
[p1]: ./building/how-to-build-and-run.html
2733
[p2]: ./contributing.md
28-
[p3]: ./part-2-intro.md
29-
[p4]: ./part-3-intro.md
30-
[p5]: ./part-4-intro.md
31-
[p6]: ./part-5-intro.md
32-
[p7]: ./appendix/background.md
34+
[p3]: ./building/bootstrapping/intro.md
35+
[p4]: ./part-2-intro.md
36+
[p5]: ./part-3-intro.md
37+
[p6]: ./cli.md
38+
[p7]: ./part-4-intro.md
39+
[p8]: ./part-5-intro.md
40+
[p9]: ./appendix/background.md
3341

3442
### Constant change
3543

src/appendix/glossary.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Term | Meaning
3131
<span id="generics">generics</span> | The list of generic parameters defined on an item. There are three kinds of generic parameters: Type, lifetime and const parameters.
3232
<span id="hir">HIR</span> | The _high-level [IR](#ir)_, created by lowering and desugaring the AST. ([see more](../hir.md))
3333
<span id="hir-id">`HirId`</span> | Identifies a particular node in the HIR by combining a def-id with an "intra-definition offset". See [the HIR chapter for more](../hir.md#identifiers-in-the-hir).
34-
<span id="hir-map">HIR map</span> | The HIR map, accessible via `tcx.hir()`, allows you to quickly navigate the HIR and convert between various forms of identifiers.
3534
<span id="ice">ICE</span> | Short for _internal compiler error_, this is when the compiler crashes.
3635
<span id="ich">ICH</span> | Short for _incremental compilation hash_, these are used as fingerprints for things such as HIR and crate metadata, to check if changes have been made. This is useful in incremental compilation to see if part of a crate has changed and should be recompiled.
3736
<span id="infcx">`infcx`</span> | The type inference context (`InferCtxt`). (see `rustc_middle::infer`)

src/ast-validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AST Validation
1+
# AST validation
22

33
_AST validation_ is a separate AST pass that visits each
44
item in the tree and performs simple checks. This pass

0 commit comments

Comments
 (0)