Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
eda3ca4
document EMIT_MIR_FOR_EACH_PANIC_STRATEGY
tshepang Aug 27, 2026
ef45c82
Document that `rustc_codegen_gcc` now uses Josh
Kobzol Oct 19, 2026
9a62a8d
ci: Ignore `unpinned-uses` for `josh-sync/rustc-pull`
hashcatHitman Oct 7, 2026
2aece4b
ci: Pin `actions/cache` to 4.3.0 hash
hashcatHitman Oct 7, 2026
cc5cff8
ci: Pin `actions/checkout` to 7.0.1 hash
hashcatHitman Oct 7, 2026
3d1d5a0
ci: Pin `actions/github-script` to 7.1.0 hash
hashcatHitman Oct 7, 2026
0f9d598
ci: Disable credential persistence
hashcatHitman Oct 22, 2026
afeff76
ci: Prefer shell expansion over template expansion
hashcatHitman Oct 22, 2026
e6c00a8
ci: Disable all permissions by default
hashcatHitman Oct 22, 2026
a50f326
ci: Grant minimum required permissions
hashcatHitman Oct 22, 2026
f327db7
Merge pull request #3045 from hashcatHitman/ref-version-mismatch_and_…
Kobzol Oct 26, 2026
9f832e0
reflow src/tests/directives.md
tshepang Oct 31, 2026
1dcce6b
improve tests/directives.md
tshepang Oct 31, 2026
99b62e4
that made me think files should have this name
tshepang Oct 31, 2026
73da0c1
reflow src/rustdoc-internals/rustdoc-html-test-suite.md
tshepang Oct 31, 2026
2e541c3
sembr src/traits/canonicalization.md
tshepang Oct 31, 2026
63fdb59
improve traits/canonicalization.md
tshepang Oct 31, 2026
4496185
reflow src/traits/canonicalization.md
tshepang Oct 31, 2026
8f09efb
fix sembr tool fail
tshepang Oct 31, 2026
2f7cf45
sembr src/type-inference.md
tshepang Oct 31, 2026
eaeddd6
improve type-inference.md
tshepang Oct 31, 2026
8ce5ef2
reflow src/type-inference.md
tshepang Oct 31, 2026
b22380e
double space is very common... I do not remember seeing more
tshepang Oct 31, 2026
70a37c2
binding not needed
tshepang Oct 31, 2026
0a70cc5
sembr src/ty-module/early-binder.md
tshepang Oct 31, 2026
0ca475b
improve ty-module/early-binder.md
tshepang Oct 31, 2026
321fc64
sembr src/ty-module/early-binder.md
tshepang Oct 31, 2026
3fa40ce
reflow src/ty-module/early-binder.md
tshepang Oct 31, 2026
a0dbfe0
sembr src/traits/resolution.md
tshepang Oct 31, 2026
b4ac055
improve traits/resolution.md
tshepang Oct 31, 2026
8abb3a5
reflow src/traits/resolution.md
tshepang Oct 31, 2026
c2eb43d
Merge pull request #3081 from rust-lang/tshepang/misc
tshepang Oct 31, 2026
f2c076c
Merge pull request #3077 from Kobzol/cg-gcc-josh
tshepang Oct 31, 2026
8dcc6f8
reflow src/tests/ci.md
tshepang Oct 31, 2026
ed64975
improve tests/ci.md
tshepang Oct 31, 2026
aaa958a
Merge pull request #3082 from rust-lang/tshepang/misc
tshepang Oct 31, 2026
43272c7
Merge pull request #2983 from rust-lang/tshepang-patch-2
tshepang Oct 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions src/doc/rustc-dev-guide/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ on:
# Run multiple times a day as the successful cached links are not checked every time.
- cron: "0 */8 * * *"

permissions: {}

jobs:
ci:
if: github.repository == 'rust-lang/rustc-dev-guide'
runs-on: ubuntu-latest
permissions:
contents: write # Required by `git push`
env:
MDBOOK_VERSION: 0.5.2
MDBOOK_LINKCHECK2_VERSION: 0.13.0
Expand All @@ -26,13 +30,14 @@ jobs:
with:
# linkcheck needs the base commit.
fetch-depth: 0
persist-credentials: false

- name: Test CI scripts
run: ci/tests/report-scheduled-linkcheck-failure.sh

- name: Cache binaries
id: mdbook-cache
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cargo/bin
Expand All @@ -41,7 +46,7 @@ jobs:
- name: Restore cached Linkcheck
if: github.event_name == 'schedule'
id: cache-linkcheck-restore
uses: actions/cache/restore@v4
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: book/linkcheck/cache.json
key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ github.run_id }}
Expand All @@ -57,9 +62,9 @@ jobs:
- name: Install Dependencies
if: steps.mdbook-cache.outputs.cache-hit != 'true'
run: |
cargo install --locked mdbook --version ${{ env.MDBOOK_VERSION }}
cargo install --locked mdbook-linkcheck2 --version ${{ env.MDBOOK_LINKCHECK2_VERSION }}
cargo install --locked mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }}
cargo install --locked mdbook --version ${MDBOOK_VERSION}
cargo install --locked mdbook-linkcheck2 --version ${MDBOOK_LINKCHECK2_VERSION}
cargo install --locked mdbook-mermaid --version ${MDBOOK_MERMAID_VERSION}

- name: Check build
run: ENABLE_LINKCHECK=1 mdbook build
Expand All @@ -73,24 +78,24 @@ jobs:
- name: Save cached Linkcheck
id: cache-linkcheck-save
if: ${{ !cancelled() && github.event_name == 'schedule' }}
uses: actions/cache/save@v4
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: book/linkcheck/cache.json
key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ github.run_id }}

- name: Deploy to gh-pages
if: github.event_name == 'push'
run: |
touch "${{ env.DEPLOY_DIR }}/.nojekyll"
cp CNAME "${{ env.DEPLOY_DIR }}"
cd "${{ env.DEPLOY_DIR }}"
touch "${DEPLOY_DIR}/.nojekyll"
cp CNAME "${DEPLOY_DIR}"
cd "${DEPLOY_DIR}"
rm -rf .git
git init
git config user.name "Deploy from CI"
git config user.email ""
git add .
git commit -m "Deploy ${GITHUB_SHA} to gh-pages"
git push --quiet -f "https://x-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}" HEAD:gh-pages
git push --quiet -f "https://x-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}" HEAD:gh-pages

- name: Check if files comply with semantic line breaks
continue-on-error: true
Expand All @@ -104,11 +109,11 @@ jobs:
if: failure() && github.event_name == 'schedule'
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
issues: write
issues: write # Required to open issues with `gh issue create`
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Open an issue or comment on an existing one
run: ci/report-scheduled-linkcheck-failure.sh
env:
Expand All @@ -120,10 +125,11 @@ jobs:
if: success() && github.event_name == 'schedule'
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
issues: write # Required to close issues with `gh issue close`
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Close issue
run: ci/close-scheduled-linkcheck-issues.sh
env:
Expand Down
11 changes: 8 additions & 3 deletions src/doc/rustc-dev-guide/.github/workflows/date-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ on:
# Allow manually starting the workflow
workflow_dispatch:

permissions: {}

jobs:
date-check:
if: github.repository == 'rust-lang/rustc-dev-guide'
runs-on: ubuntu-latest

permissions:
issues: write # Required by `actions/github-script` to open issues
steps:
- name: Checkout repo
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Ensure Rust is up-to-date
run: |
Expand All @@ -25,7 +30,7 @@ jobs:
run: cargo run --manifest-path ci/date-check/Cargo.toml . > date-check-output.txt

- name: Open issue
uses: actions/github-script@v7
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
with:
script: |
const fs = require('fs');
Expand Down
6 changes: 6 additions & 0 deletions src/doc/rustc-dev-guide/.github/workflows/rustc-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ on:
# Run at 04:00 UTC every Monday
- cron: '0 4 * * 1'

permissions: {}

jobs:
pull:
if: github.repository == 'rust-lang/rustc-dev-guide'
permissions:
contents: write # Required by `josh-sync/rustc-pull` to push to a branch
pull-requests: write # Required by `josh-sync/rustc-pull` to open a PR
# zizmor: ignore[unpinned-uses] We explicitly want to track the main branch.
uses: rust-lang/josh-sync/.github/workflows/rustc-pull.yml@main
with:
github-app-id: ${{ vars.APP_CLIENT_ID }}
Expand Down
18 changes: 9 additions & 9 deletions src/doc/rustc-dev-guide/ci/sembr/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,10 @@ fn comply(content: &str) -> String {
line.find(|ch: char| !ch.is_whitespace()).unwrap()
};
let mut newly_split_lines = line.split_inclusive(&*REGEX_SPLIT);
let first = newly_split_lines.next().unwrap().trim_end().to_owned();
let mut remaining: Vec<_> = newly_split_lines
.map(|portion| format!("{:indent$}{}", "", portion.trim_end()))
.collect();
let mut new_lines = Vec::new();
new_lines.push(first);
new_lines.push(newly_split_lines.next().unwrap().trim_end().to_owned());
let mut remaining: Vec<_> =
newly_split_lines.map(|portion| format!("{:indent$}{}", "", portion.trim())).collect();
new_lines.append(&mut remaining);
new_content.splice(new_n..=new_n, new_lines.clone());
new_n += new_lines.len() - 1;
Expand Down Expand Up @@ -244,13 +242,14 @@ some code. block
```
sentence with *italics* should not be ignored. truly.
git log main.. compiler
foo. bar. baz
o? whatever
r? @reviewer
r? @reviewer
~? diagnostic

the queries that we do, as well as the **query DAG**. The

trim double space. or many spaces. in this next sentence
";
let expected = "
# some. heading
Expand All @@ -276,9 +275,6 @@ some code. block
sentence with *italics* should not be ignored.
truly.
git log main.. compiler
foo.
bar.
baz
o?
whatever
r? @reviewer
Expand All @@ -287,6 +283,10 @@ r? @reviewer

the queries that we do, as well as the **query DAG**.
The

trim double space.
or many spaces.
in this next sentence
";
assert_eq!(expected, comply(original));
}
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/src/external-repos.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ you should include fixes for those in the rustc PR as well.
* Using `git subtree`
* `clippy` ([sync guide](https://doc.rust-lang.org/nightly/clippy/development/infrastructure/sync.html#performing-the-sync-from-rust-langrust-to-clippy))
* `portable-simd` ([sync script](https://github.com/rust-lang/portable-simd/blob/master/subtree-sync.sh))
* `rustc_codegen_gcc` ([sync guide](https://github.com/rust-lang/rustc_codegen_gcc/blob/master/doc/subtree.md))
* Using the [josh](#synchronizing-a-josh-subtree) tool
* `miri`
* `rust-analyzer`
* `rustc_codegen_cranelift`
* `rustc_codegen_gcc`
* `rustc-dev-guide`
* `rustfmt`
* `compiler-builtins`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This page is about the test suite named `rustdoc-html` used to test the HTML output of `rustdoc`.
For other rustdoc-specific test suites, see [Rustdoc test suites].

Each test file in this test suite is simply a Rust source file `file.rs` sprinkled with
Each test file in this test suite is simply a Rust source file sprinkled with
so-called *directives* located inside normal Rust code comments.
These come in two flavors: *Compiletest* and *HtmlDocCk*.

Expand Down Expand Up @@ -145,8 +145,8 @@ Checks that the directory given by `PATH` contains exactly `ENTRIES`.
## Compiletest Directives (Brief)

As mentioned in the introduction, you also have access to [compiletest directives].
Most importantly, they allow you to register auxiliary crates and
to pass flags to the `rustdoc` binary under test.
Most importantly,
they allow you to register auxiliary crates and to pass flags to the `rustdoc` binary under test.
It's *strongly recommended* to read that chapter if you don't know anything about them yet.

Here are some details that are relevant to this test suite specifically:
Expand Down Expand Up @@ -177,9 +177,9 @@ the original negative check failing.

**Note**: Please avoid the use of *negated* checks!

**Tip**: If you can't avoid it, please **always** pair it with an analogous positive check in the
immediate vicinity, so people changing "the shape" have a chance to notice and to update the
negated check!
**Tip**: If you can't avoid it,
please **always** pair it with an analogous positive check in the immediate vicinity,
so people changing "the shape" have a chance to notice and to update the negated check!

## Limitations

Expand Down
Loading
Loading