Skip to content

Commit 36d309e

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 41d8d85 + 8365fcb commit 36d309e

File tree

15,002 files changed

+1153804
-228167
lines changed

Some content is hidden

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

15,002 files changed

+1153804
-228167
lines changed

.editorconfig

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@ root = true
77
[*]
88
end_of_line = lf
99
charset = utf-8
10-
trim_trailing_whitespace = true
1110
insert_final_newline = true
1211

12+
# some tests need trailing whitespace in output snapshots
13+
[!tests/]
14+
trim_trailing_whitespace = true
15+
# for actual source code files of test, we still don't want trailing whitespace
16+
[tests/**.{rs,js}]
17+
trim_trailing_whitespace = true
18+
# these specific source files need to have trailing whitespace.
19+
[tests/ui/{frontmatter/frontmatter-whitespace-3.rs,parser/shebang/shebang-space.rs}]
20+
trim_trailing_whitespace = false
21+
1322
[!src/llvm-project]
1423
indent_style = space
1524
indent_size = 4

.github/ISSUE_TEMPLATE/documentation.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Documentation problem
2-
description: Create a report for a documentation problem.
2+
description: Report an issue with documentation content.
33
labels: ["A-docs"]
44
body:
55
- type: markdown
@@ -19,20 +19,20 @@ body:
1919
- [The Rustonomicon](https://github.com/rust-lang/nomicon/issues)
2020
- [The Embedded Book](https://github.com/rust-embedded/book/issues)
2121
22-
All other documentation issues should be filed here.
22+
Or, if you find an issue related to rustdoc (e.g. doctest, rustdoc UI), please use the rustdoc issue template instead.
2323
24-
Or, if you find an issue related to rustdoc (e.g. doctest, rustdoc UI), please use the bug report or blank issue template instead.
24+
All other documentation issues should be filed here.
2525
2626
- type: textarea
2727
id: location
2828
attributes:
29-
label: Location
29+
label: Location (URL)
3030
validations:
31-
required: true
31+
required: true
3232

3333
- type: textarea
3434
id: summary
3535
attributes:
3636
label: Summary
3737
validations:
38-
required: true
38+
required: true

.github/ISSUE_TEMPLATE/rustdoc.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: Problem with rustdoc
3+
about: Report an issue with how docs get generated.
4+
labels: C-bug, T-rustdoc
5+
---
6+
<!--
7+
Thank you for filing a rustdoc issue! Rustdoc is the tool that handles the generation of docs. It is usually invoked via `cargo doc`, but can also be used directly.
8+
9+
If you have an issue with the actual content of the docs, use the "Documentation problem" template instead.
10+
-->
11+
12+
# Code
13+
<!-- problematic snippet and/or link to repo and/or full path of standard library function -->
14+
15+
```rust
16+
<code>
17+
```
18+
19+
# Reproduction Steps
20+
<!--
21+
* command(s) to run, if any
22+
* permalink to hosted documentation, if any
23+
* search query, if any
24+
-->
25+
26+
# Expected Outcome
27+
<!--
28+
What did you want to happen?
29+
30+
For GUI issues, feel free to provide a mockup image of what you want it to look like.
31+
32+
For diagnostics, please provide a mockup of the desired output in a code block.
33+
-->
34+
35+
# Actual Output
36+
<!--
37+
* rustdoc console output
38+
* browser screenshot of generated html
39+
* rustdoc json (prettify by running through `jq` or running thorugh an online formatter)
40+
-->
41+
```console
42+
<code>
43+
```
44+
45+
46+
# Version
47+
<!--
48+
Available via `rustdoc --version` or under the "Help" menu.
49+
50+
If the issue involves opening the documentation in a browser, please also provide the name and version of the browser used.
51+
-->
52+
53+
# Additional Details
54+
<!-- Anything else you think is relevant -->
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: Future Incompatibility Tracking Issue
3+
about: A tracking issue for a future-incompatible lint
4+
title: Tracking Issue for future-incompatibility lint XXX
5+
labels: C-tracking-issue C-future-incompatibility T-compiler A-lints
6+
---
7+
<!--
8+
Thank you for creating a future-incompatible tracking issue! 📜 These issues
9+
are for lints that implement a future-incompatible warning.
10+
11+
Remember to add team labels to the tracking issue.
12+
For something that affects the language, this would be `T-lang`, and for libs
13+
it would be `T-libs-api`.
14+
Also check for any `A-` labels to add.
15+
-->
16+
17+
This is the **tracking issue** for the `YOUR_LINT_NAME_HERE` future-compatibility warning and other related errors. The goal of this page is to describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made. For more information on the policy around future-compatibility warnings, see our [breaking change policy guidelines][guidelines].
18+
19+
[guidelines]: https://rustc-dev-guide.rust-lang.org/bug-fix-procedure.html
20+
21+
### What is the warning for?
22+
23+
*Describe the conditions that trigger the warning.*
24+
25+
### Why was this change made?
26+
27+
*Explain why this change was made. If there is additional context, like an MCP, link it here.*
28+
29+
### Example
30+
31+
```rust
32+
// Include an example here.
33+
```
34+
35+
### Recommendations
36+
37+
*Give some recommendations on how a user can avoid the lint.*
38+
39+
### When will this warning become a hard error?
40+
41+
*If known, describe the future plans. For example, how long you anticipate this being a warning, or if there are other factors that will influence the anticipated closure.*
42+
43+
### Steps
44+
45+
- [ ] Implement the lint
46+
- [ ] Raise lint level to deny
47+
- [ ] Change the lint to report in dependencies
48+
- [ ] Switch to a hard error
49+
50+
### Implementation history
51+
52+
<!--
53+
Include a list of all the PRs that were involved in implementing the lint.
54+
-->

.github/workflows/ci.yml

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ concurrency:
3434
# For a given workflow, if we push to the same branch, cancel all previous builds on that branch.
3535
# We add an exception for try builds (try branch) and unrolled rollup builds (try-perf), which
3636
# are all triggered on the same branch, but which should be able to run concurrently.
37-
group: ${{ github.workflow }}-${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.sha) || github.ref }}
37+
group: ${{ github.workflow }}-${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/automation/bors/try') && github.sha) || github.ref }}
3838
cancel-in-progress: true
3939
env:
4040
TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
@@ -46,33 +46,40 @@ jobs:
4646
# If you want to modify CI jobs, take a look at src/ci/github-actions/jobs.yml.
4747
calculate_matrix:
4848
name: Calculate job matrix
49-
runs-on: ubuntu-24.04
49+
runs-on: ubuntu-24.04-arm
5050
outputs:
5151
jobs: ${{ steps.jobs.outputs.jobs }}
5252
run_type: ${{ steps.jobs.outputs.run_type }}
5353
steps:
5454
- name: Checkout the source code
55-
uses: actions/checkout@v4
56-
# Cache citool to make its build faster, as it's in the critical path.
57-
# The rust-cache doesn't bleed into the main `job`, so it should not affect any other
58-
# Rust compilation.
59-
- name: Cache citool
60-
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
61-
with:
62-
workspaces: src/ci/citool
55+
uses: actions/checkout@v5
56+
- name: Test citool
57+
# Only test citool on the auto branch, to reduce latency of the calculate matrix job
58+
# on PR/try builds.
59+
if: ${{ github.ref == 'refs/heads/auto' }}
60+
run: |
61+
cd src/ci/citool
62+
CARGO_INCREMENTAL=0 cargo test
6363
- name: Calculate the CI job matrix
6464
env:
6565
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
6666
run: |
6767
cd src/ci/citool
68-
CARGO_INCREMENTAL=0 cargo test
6968
CARGO_INCREMENTAL=0 cargo run calculate-job-matrix >> $GITHUB_OUTPUT
7069
id: jobs
7170
job:
7271
name: ${{ matrix.full_name }}
7372
needs: [ calculate_matrix ]
7473
runs-on: "${{ matrix.os }}"
7574
timeout-minutes: 360
75+
# The bors environment contains secrets required for elevated workflows (try and auto builds),
76+
# which need to access e.g. S3 and upload artifacts. We want to provide access to that
77+
# environment only on the try/auto branches, which are only accessible to bors.
78+
# This also ensures that PR CI (which doesn't get write access to S3) works, as it cannot
79+
# access the environment.
80+
#
81+
# We only enable the environment for the rust-lang/rust repository, so that CI works on forks.
82+
environment: ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/automation/bors/try' || github.ref == 'refs/heads/auto')) && 'bors') || '' }}
7683
env:
7784
CI_JOB_NAME: ${{ matrix.name }}
7885
CI_JOB_DOC_URL: ${{ matrix.doc_url }}
@@ -106,18 +113,25 @@ jobs:
106113
run: git config --global core.autocrlf false
107114

108115
- name: checkout the source code
109-
uses: actions/checkout@v4
116+
uses: actions/checkout@v5
110117
with:
111118
fetch-depth: 2
112119

113-
# Free up disk space on Linux by removing preinstalled components that
120+
# Free up disk space on Linux and Windows by removing preinstalled components that
114121
# we do not need. We do this to enable some of the less resource
115122
# intensive jobs to run on free runners, which however also have
116123
# less disk space.
117124
- name: free up disk space
118125
run: src/ci/scripts/free-disk-space.sh
119126
if: matrix.free_disk
120127

128+
# If we don't need to free up disk space then just report how much space we have
129+
- name: print disk usage
130+
run: |
131+
echo "disk usage:"
132+
df -h
133+
if: matrix.free_disk == false
134+
121135
# Rust Log Analyzer can't currently detect the PR number of a GitHub
122136
# Actions build on its own, so a hint in the log message is needed to
123137
# point it in the right direction.
@@ -209,6 +223,11 @@ jobs:
209223
cd src/ci/citool
210224
CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build
211225
226+
- name: wait for Windows disk cleanup to finish
227+
if: ${{ matrix.free_disk && startsWith(matrix.os, 'windows-') }}
228+
run: |
229+
python3 src/ci/scripts/free-disk-space-windows-wait.py
230+
212231
- name: run the build
213232
run: |
214233
set +e
@@ -225,8 +244,8 @@ jobs:
225244
fi
226245
exit ${STATUS}
227246
env:
228-
AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
229-
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
247+
AWS_ACCESS_KEY_ID: ${{ secrets.CACHES_AWS_ACCESS_KEY_ID }}
248+
AWS_SECRET_ACCESS_KEY: ${{ secrets.CACHES_AWS_SECRET_ACCESS_KEY }}
230249

231250
- name: create github artifacts
232251
run: src/ci/scripts/create-doc-artifacts.sh
@@ -248,8 +267,8 @@ jobs:
248267
- name: upload artifacts to S3
249268
run: src/ci/scripts/upload-artifacts.sh
250269
env:
251-
AWS_ACCESS_KEY_ID: ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
252-
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
270+
AWS_ACCESS_KEY_ID: ${{ secrets.ARTIFACTS_AWS_ACCESS_KEY_ID }}
271+
AWS_SECRET_ACCESS_KEY: ${{ secrets.ARTIFACTS_AWS_SECRET_ACCESS_KEY }}
253272
# Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
254273
# builders *should* have the AWS credentials available. Still, explicitly
255274
# adding the condition is helpful as this way CI will not silently skip
@@ -299,7 +318,7 @@ jobs:
299318
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
300319
steps:
301320
- name: checkout the source code
302-
uses: actions/checkout@v4
321+
uses: actions/checkout@v5
303322
with:
304323
fetch-depth: 2
305324
# Calculate the exit status of the whole CI workflow.

.github/workflows/dependencies.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ env:
1919
PR_TITLE: Weekly `cargo update`
2020
PR_MESSAGE: |
2121
Automation to keep dependencies in `Cargo.lock` current.
22+
r? dep-bumps
2223
2324
The following is the output from `cargo update`:
2425
COMMIT_MESSAGE: "cargo update \n\n"
@@ -50,7 +51,7 @@ jobs:
5051
runs-on: ubuntu-24.04
5152
steps:
5253
- name: checkout the source code
53-
uses: actions/checkout@v4
54+
uses: actions/checkout@v5
5455
with:
5556
submodules: recursive
5657
- name: install the bootstrap toolchain
@@ -100,7 +101,7 @@ jobs:
100101
pull-requests: write
101102
steps:
102103
- name: checkout the source code
103-
uses: actions/checkout@v4
104+
uses: actions/checkout@v5
104105

105106
- name: download Cargo.lock from update job
106107
uses: actions/download-artifact@v4

.github/workflows/ghcr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
# Needed to write to the ghcr.io registry
3030
packages: write
3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v5
3333
with:
3434
persist-credentials: false
3535

@@ -53,9 +53,9 @@ jobs:
5353
run: |
5454
# List of DockerHub images to mirror to ghcr.io
5555
images=(
56-
# Mirrored because used by the mingw-check-tidy, which doesn't cache Docker images
56+
# Mirrored because used by the tidy job, which doesn't cache Docker images
5757
"ubuntu:22.04"
58-
# Mirrored because used by all linux CI jobs, including mingw-check-tidy
58+
# Mirrored because used by all linux CI jobs, including tidy
5959
"moby/buildkit:buildx-stable-1"
6060
# Mirrored because used when CI is running inside a Docker container
6161
"alpine:3.4"

.github/workflows/post-merge.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
permissions:
1616
pull-requests: write
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
with:
2020
# Make sure that we have enough commits to find the parent merge commit.
2121
# Since all merges should be through merge commits, fetching two commits
@@ -25,12 +25,19 @@ jobs:
2525
env:
2626
GH_TOKEN: ${{ github.token }}
2727
run: |
28+
# Give GitHub some time to propagate the information that the PR was merged
29+
sleep 60
30+
2831
# Get closest bors merge commit
2932
PARENT_COMMIT=`git rev-list --author='bors <[email protected]>' -n1 --first-parent HEAD^1`
3033
echo "Parent: ${PARENT_COMMIT}"
3134
3235
# Find PR for the current commit
3336
HEAD_PR=`gh pr list --search "${{ github.sha }}" --state merged --json number --jq '.[0].number'`
37+
if [ -z "${HEAD_PR}" ]; then
38+
echo "PR for commit SHA ${{ github.sha }} not found, exiting"
39+
exit 1
40+
fi
3441
echo "HEAD: ${{ github.sha }} (#${HEAD_PR})"
3542
3643
cd src/ci/citool

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ __pycache__/
8585

8686
## Node
8787
node_modules
88-
package-lock.json
89-
package.json
9088
/src/doc/rustc-dev-guide/mermaid.min.js
9189

9290
## Rustdoc GUI tests

0 commit comments

Comments
 (0)