Skip to content

Commit 5f32dda

Browse files
authored
Merge branch 'master' into mir-queries
2 parents 43fc9a3 + 0bd5b6a commit 5f32dda

File tree

196 files changed

+10047
-4231
lines changed

Some content is hidden

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

196 files changed

+10047
-4231
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ root = true
33
[src/*]
44
end_of_line = lf
55
insert_final_newline = true
6+
max_line_length = 100
67

78
[ci/*.sh]
89
indent_style = space

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Set the default behavior, in case people don't have core.autocrlf set.
22
* text=auto eol=lf
33

4+
# git grep shouldn't match entries in huge minified javascript
5+
*.min.js binary
6+
47
# Older git versions try to fix line endings on images, this prevents it.
58
*.png binary
69
*.jpg binary

.github/workflows/ci.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,45 +14,39 @@ jobs:
1414
if: github.repository == 'rust-lang/rustc-dev-guide'
1515
runs-on: ubuntu-latest
1616
env:
17-
MDBOOK_VERSION: 0.4.12
18-
MDBOOK_LINKCHECK_VERSION: 0.7.2
19-
MDBOOK_MERMAID_VERSION: 0.10.0
20-
MDBOOK_TOC_VERSION: 0.6.1
17+
MDBOOK_VERSION: 0.4.21
18+
MDBOOK_LINKCHECK_VERSION: 0.7.6
19+
MDBOOK_MERMAID_VERSION: 0.12.6
20+
MDBOOK_TOC_VERSION: 0.11.2
2121
DEPLOY_DIR: book/html
2222
BASE_SHA: ${{ github.event.pull_request.base.sha }}
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2324
steps:
24-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v4
2526
with:
2627
# linkcheck needs the base commit.
2728
fetch-depth: 0
2829

2930
- name: Cache binaries
3031
id: mdbook-cache
31-
uses: actions/cache@v2
32+
uses: actions/cache@v4
3233
with:
3334
path: |
3435
~/.cargo/bin
3536
key: ${{ runner.os }}-${{ env.MDBOOK_VERSION }}--${{ env.MDBOOK_LINKCHECK_VERSION }}--${{ env.MDBOOK_TOC_VERSION }}--${{ env.MDBOOK_MERMAID_VERSION }}
3637

3738
- name: Cache linkcheck
38-
uses: actions/cache@v2
39+
uses: actions/cache@v4
3940
with:
4041
path: |
4142
~/book/linkcheck
4243
key: ${{ runner.os }}-${{ hashFiles('./book/linkcheck') }}
4344

44-
- name: Check line lengths
45-
if: github.event_name != 'push'
46-
run: |
47-
shopt -s globstar
48-
MAX_LINE_LENGTH=100 bash ci/check_line_lengths.sh src/**/*.md
49-
5045
- name: Install latest nightly Rust toolchain
5146
if: steps.mdbook-cache.outputs.cache-hit != 'true'
52-
uses: actions-rs/toolchain@v1
53-
with:
54-
toolchain: nightly
55-
override: true
47+
run: |
48+
rustup update nightly
49+
rustup override set nightly
5650
5751
- name: Install Dependencies
5852
if: steps.mdbook-cache.outputs.cache-hit != 'true'

.github/workflows/date-check.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Checkout repo
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
1919

2020
- name: Ensure Rust is up-to-date
2121
run: |
@@ -27,17 +27,16 @@ jobs:
2727
cargo run -- ../../src/ > ../../date-check-output.txt
2828
2929
- name: Open issue
30-
uses: actions/github-script@v3
30+
uses: actions/github-script@v7
3131
with:
32-
github-token: ${{secrets.GITHUB_TOKEN}}
3332
script: |
3433
const fs = require('fs');
3534
3635
const rawText = fs.readFileSync('date-check-output.txt', { encoding: 'utf8' });
3736
const title = rawText.split('\n')[0];
3837
if (title != 'empty') {
3938
const body = rawText.split('\n').slice(1).join('\n');
40-
github.issues.create({
39+
github.rest.issues.create({
4140
owner: context.repo.owner,
4241
repo: context.repo.repo,
4342
title,

.mailmap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
3+
4+
5+
Jynn Nelson <[email protected]>

CITATION.cff

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
cff-version: 1.2.0
2+
message: If you use this guide, please cite it using these metadata.
3+
title: Rust Compiler Development Guide (rustc-dev-guide)
4+
abstract: A guide to developing the Rust compiler (rustc)
5+
authors:
6+
- name: "The Rust Project Developers"
7+
date-released: "2018-01-16"
8+
license: "MIT OR Apache-2.0"
9+
repository-code: "https://github.com/rust-lang/rustc-dev-guide"

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# The Rust Code of Conduct
22

3-
This repository follows the [Code of Conduct](https://www.rust-lang.org/conduct.html) of the Rust organization.
3+
This repository follows the [Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct) of the Rust organization.

README.md

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ To build a local static HTML site, install [`mdbook`](https://github.com/rust-la
4949
and execute the following command in the root of the repository:
5050

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

55-
The build files are found in the `book` directory.
55+
The build files are found in the `book/html` directory.
5656

5757
### Link Validations
5858

@@ -64,25 +64,6 @@ We use `mdbook-linkcheck` to validate URLs included in our documentation.
6464
We use `mdbook-toc` to auto-generate TOCs for long sections. You can invoke the preprocessor by
6565
including the `<!-- toc -->` marker at the place where you want the TOC.
6666

67-
### Pre-commit script
68-
69-
We also test that line lengths are less than 100 columns. To test this locally,
70-
you can run `ci/check_line_lengths.sh`.
71-
72-
You can also set this to run automatically.
73-
74-
On Linux:
75-
76-
```bash
77-
ln -s ../../ci/check_line_lengths.sh .git/hooks/pre-commit
78-
```
79-
80-
On Windows:
81-
82-
```powershell
83-
New-Item -Path .git/hooks/pre-commit -ItemType HardLink -Value <absolute_path/to/check_line_lengths.sh>
84-
```
85-
8667
## How to fix toolstate failures
8768

8869
> **NOTE**: Currently, we do not track the rustc-dev-guide toolstate due to
@@ -118,7 +99,7 @@ git submodule update --remote src/doc/rustc-dev-guide
11899
git add -u
119100
git commit -m "Update rustc-dev-guide"
120101
# Note that you can use -i, which is short for --incremental, in the following command
121-
./x.py test --incremental src/doc/rustc-dev-guide # This is optional and should succeed anyway
102+
./x test --incremental src/doc/rustc-dev-guide # This is optional and should succeed anyway
122103
# Open a PR in rust-lang/rust
123104
```
124105

book.toml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[book]
2-
title = "Guide to Rustc Development"
3-
author = "Rustc developers"
4-
description = "A guide to developing rustc"
2+
title = "Rust Compiler Development Guide"
3+
author = "The Rust Project Developers"
4+
description = "A guide to developing the Rust compiler (rustc)"
55

66
[build]
77
create-missing = false
@@ -15,9 +15,12 @@ command = "mdbook-mermaid"
1515

1616
[output.html]
1717
git-repository-url = "https://github.com/rust-lang/rustc-dev-guide"
18-
edit-url-template = "https://github.com/rust-lang/rustc-dev-guide/tree/master/{path}?mode=edit"
18+
edit-url-template = "https://github.com/rust-lang/rustc-dev-guide/edit/master/{path}"
1919
additional-js = ["mermaid.min.js", "mermaid-init.js"]
2020

21+
[output.html.search]
22+
use-boolean-and = true
23+
2124
[output.html.fold]
2225
enable = true
2326
level = 0
@@ -35,11 +38,15 @@ exclude = [
3538
"www\\.amazon\\.com",
3639
"www\\.rustaceans\\.org",
3740
"play\\.rust-lang\\.org",
38-
"tomlee\\.co"
41+
"tomlee\\.co",
42+
"marketplace\\.visualstudio\\.com",
43+
"objects\\.githubusercontent\\.com"
3944
]
4045
cache-timeout = 86400
4146
warning-policy = "error"
4247

4348
[output.html.redirect]
4449
"/compiletest.html" = "tests/compiletest.html"
45-
"/diagnostics/sessiondiagnostic.html" = "diagnostics/diagnostic-structs.html"
50+
"/diagnostics/sessiondiagnostic.html" = "diagnostic-structs.html"
51+
"/diagnostics/diagnostic-codes.html" = "error-codes.html"
52+
"/miri.html" = "const-eval/interpret.html"

ci/check_line_lengths.sh

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)